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 = 0xffffffffffffffff
Assuming you aren't worried about negative values, you could try using an unsigned long:
private ulong l = 0xffffffffffffffffL;
In Java the actual value of l would be -1, because it would overflow the 2^63 - 1 maximum value, so you could just replace your constant with -1.
l
-1
2^63 - 1