I have ported Java code to C#.
Could you please explain why I have compile-time error in the follow line (I use VS 2008):
private long l = 0xffffffffffffffffL; // 16 'f' got here
Cannot convert source type ulong to target type long
I need the same value here as for origin Java code.
Assuming you aren’t worried about negative values, you could try using an
unsigned long:In Java the actual value of
lwould be-1, because it would overflow the2^63 - 1maximum value, so you could just replace your constant with-1.