>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 ....
I tried several converters and they all chocked on that line. Later on, I found one that came up with that line. It does the job. I just don't understand it however. :)