3 // Undocumented IntPtr and UIntPtr conversion exceptions
7 static long CastUIntPtrToInt64 (UIntPtr ptr)
12 static uint CastIntPtrToUInt32 (IntPtr ptr)
17 public static int Main ()
19 if (IntPtr.Size < 8) {
20 if (CastUIntPtrToInt64 (new UIntPtr (uint.MaxValue)) != uint.MaxValue)
22 if (CastIntPtrToUInt32 (new IntPtr (int.MaxValue)) != int.MaxValue)
25 if (CastUIntPtrToInt64 (new UIntPtr (ulong.MaxValue)) != -1)
28 if (CastIntPtrToUInt32 (new IntPtr (long.MaxValue)) != uint.MaxValue)