Martin
public text v1 · immuableusing System;
class X
{
static void Test (long value)
{
IntPtr ptr;
try {
ptr = new IntPtr (value);
Console.WriteLine ("OK");
} catch {
Console.WriteLine ("ERROR");
}
}
static void Main ()
{
Test (-1);
Test (0x07fffffffL);
Test (0x080000001L);
Test (0x0bfffffffL);
Test (0x0ffffffffL);
}
}