This code uses the original value of say 0 in the variable "Index" and then increments the value afterwards. But converting this code to VB. net does not do this!
After conversion we get the following:-
TestValue = TestArray(System.Math.Max(System.Threading.Interlocked.Increment(Index),Index - 1))
The converted code always increments the value first and never uses the initial value of say 0 before it is incremented. You use a the function Max which take the highest value, but your use of Max never uses "Index - 1" as its always less, making it pointless to use the Max function. The proper conversion would be:
TestValue = TestArray(Index)
Please can you fix this bug?
|No comments, yet. Be the first!|