Actually, I didn't notice the use of Interlocked.Increment
and .Decrement. C# makes no guarantees that the ++ operator is thread-
safe. I'm not sure why the author of that converter would write it that
way.
If you don't want the Interlocked methods you could rewrite the C# as
follows:
for(int i=0, j=ledCount; i<ledCount; i+=1, j-=1)
{
}
for which the result will be:
Dim i As Integer = 0
Dim j As Integer = ledCount
While i < ledCount
i += 1
j -= 1
End While
===================================
This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com