I'm in the process of porting some ANSI C++ code to C#... and this is killing me right now.
Both tests have value = 6844268
.
Test code:
value >> 12
value & 0x00000FFF
C++ returns 18273 and 29497, whereas C# returns 1670 and 3948. I've tried every possible combination of types in C# (int, uint, long, ulong, Int64...), but no go :(
Original value in C++ is unsigned int. Anyone have any ideas?
EDIT: Argh, I messed up my debugging. Was looking at array[value] instead of value. My bad.