>Not an answer to your question, but why do you use a StringBuilder() when you can do without ?
>
>I think this should be sufficient as the only statement of the method
>
>return tcSearchIn.Replace(tcSearchFor, tcReplace)
>
>
>Your approach creates a StringBuilder object, which creates a char array and both the char array and the StringBuilder have to be garbage collected at some point
>
>No big deal, but I couldn't help telling you
When I built the framework, I needed the equivalent of VFP StrTran() function. After many messages, we came to the conclusion that using that approach was better. It's like in VFP when using StrTran(), we would use it no matter how long the string is. So, the same applies here. In general, it is suppose to be more better in terms of performance but on certain strings, maybe not.
Maybe there is something better in the latest version of the .NET Framework. This was created on the first one.