C Sharp Programming/Keywords/unchecked
From Wikibooks, the open-content textbooks collection
The unchecked keyword prevents overflow-checking when doing integer arithmetic. It may be used as an operator on a single expression or as a statement on a whole block of code.
int x, y, z; x = 1222111000; y = 1222111000; // used as an operator z = unchecked( x * y ); // used as a statement unchecked { z = x * y; x = z * z; }
| C# Keywords | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Special C# Identifiers | ||||||||||
|