@keigezellig said:
Another WTF (or just a copy pasta error): This won't compile. To get the length of originalText you must use originalText.LengthI'd love to stick that on him as well, but it was a 'copy -> slightly obfuscate ->paste error' I'm afraid.
@The_Assimilator said:
generally the use of ref and/or out is a good indication of code smell. In particular, ref should almost never be used in standard C#.Here's some code he wrote 2 months ago ...
string pathToDriverFile, pathToOutputFile, pathToAnotherKindOfOutputFile, pathToYetAnotherKindOfOutputFile, unusedPointlessNumberAsAString, connectionString, nameOfDatabaseTableToWriteTo;
bool useXRatherThanY;
int userId;
if (!CheckParams(inputObject, out pathToOutputFile, out pathToDriverFile, out pathToAnotherKindOfOutputFile, out pathToYetAnotherKindOfOutputFile,
out useXRatherThanY, out userId, out unusedPointlessNumberAsAString, out connectionString, out nameOfDatabaseTableToWriteTo))
{
DisplayHelpMessage();
return;
}