Wow ... those two don't even look remotely the same. What's with the System.Math and the System.Threading stuff? No mention of those in your C# version ....
~~Bonnie
>Ok, the following line does it:
>
>
>loStringBuilder.Append(tcSearchIn, System.Math.Min(System.Threading.Interlocked.Increment(lnLocation), lnLocation - 1), 1)
>