Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ulong lSmallValue = 5;
- ulong lBigValue = 10;
- ulong lDifference = lSmallValue - lBigValue;
- Console.WriteLine(lDifference);
- Console.WriteLine((long)lDifference);
- 18446744073709551611
- -5
- ulong lSmallValue = 5;
- ulong lBigValue = 10;
- checked {
- try {
- ulong lDifference = lSmallValue - lBigValue;
- }
- catch (OverflowException) {
- Console.WriteLine("Exception caught");
- }}
Add Comment
Please, Sign In to add comment