SyntaxDim result As UShort = CUShort(expression)
DescriptionNew in 2005. The CUShort function converts expression to the UShort data type; any fractional portion of expression is rounded. Usage at a Glance
ExampleDim targetNumber As UShort If IsNumeric(stringNumber) Then targetNumber = CUShort(stringNumber) End If Version DifferencesThe CUShort function is new in the 2005 version of VB. See AlsoCShort Function, CUInt Function, CULng Function |