| [ directory ] |
|
9.4 Unsigned types in C#Unsigned types are types which cannot store values in the negative range (hence unsigned ?the values stored are always positive). [4] The unsigned integral types in C# are: byte (not ubyte!), ushort, uint, and ulong. [5]
Attempting to assign a negative value to an unsigned numeric type results in a compilation or runtime error, depending on when the assignment is performed. For example, the statement uint i = -3; results in a compilation error: Constant value '-3' cannot be converted to a 'uint' |
| [ directory ] |
|