C# Language ushort


Example

A numeric type used to store 16-bit positive integers. ushort is an alias for System.UInt16, and takes up 2 bytes of memory.

Valid range is 0 to 65535.

ushort a = 50; // 50
ushort b = 65536; // Error, cannot be converted
ushort c = unchecked((ushort)65536); // Overflows (wraps around to 0)