I accidentally discovered this today. Is this supposed to happen? Is this something we should all be warned about?
Since this is an unsigned integer, shouldn't I have gotten an error?
uint foo = 10;
foo = foo - 35;
Console.WriteLine(foo);
Output: 4294967271
you have an arthmetic overflow just enable Buid-Advanced-Check for arithmetic... that and you will get this exception:
An unhandled exception of type 'System.OverflowException' occurred in Additional information: Arithmetic operation resulted in an overflow.