UInt16 Data Type

Holds unsigned 16-bit (2-byte) integer values in the range 0–65535.

Instructions

Default value
When you declare a variable of type UInt16 and leave it uninitialized,, its value defaults to zero (0).
Negation
Because UInt16 is an unsigned type, when you use the unary minus (-) operator on an expression of this type, the value is first converted to Int32 then negated.
Widening
The UInt16 data type widens to Int32, UInt32, Int, Uint, Int64, UInt64, Int128, UInt128, Real32, Real64, Real, or Real128 without any risk of overflow.
Type characters
UInt16 has no type characters.

Shared methods and properties

UInt16.Bits As UInt
Returns the number of available bits. This is always 16.
UInt16.Max As UInt16
Returns the maximum positive value.
UInt16.Min As UInt16
Returns the minimum value. This is always zero (0)

Examples

Dim foo As UInt16

See also