C# statements can execute in either checked or unchecked context. In a checked context, arithmetic overflow raises an exception. In an unchecked context, arithmetic overflow is ignored and the result is truncated.
An example, by default if you go above the MaxValue of an integer, the runtime will start again from the MinValue allowing you to do an overflow. This is the equivalent of the unchecked mode:
If you don’t want overflow to happen, you can start using the checked keyword:
checkedwhen you don't want accidental overflow / wrap-around to be a problem, and would rather see an exception.
uncheckedexplicitly sets the mode to allow overflow
The default is
uncheckedunless you tell the compiler otherwise(through code or a compiler switch