public static void UIntPtrArithmeticOverflow() { var value = new UIntPtr(ulong.MaxValue); Throws <OverflowException>(() => value.AddChecked(new UIntPtr(1U))); value = new UIntPtr(0U); Throws <OverflowException>(() => value.SubtractChecked(new UIntPtr(1U))); Equal(new UIntPtr(ulong.MaxValue), value.Subtract(new UIntPtr(1U))); }