CUShort Function in VB.NET
How to use CUShort Function?
CUShort FunctionCUShort Function
in Visual Basic.net 2008 is used to hold a 16-bit integer ranging from from 0 to 65,535.The default
held by this datatype is zero and the fractional parts are rounded.
Dim dble As Double = 162.57
Dim shrt As Short
shrt = CUShort(dble)
Console.WriteLine("16 bit unsigned short value is::" & shrt)
16 bit unsigned short value is:: 163
In the above CUShort Function example, an expression of type Double is converted to an 16-bit unsigned short
integer using the CUShort().