Convert.ToDecimal (UInt16) converts 16-bit unsigned integer to decimal number.
Module Example
Public Sub Main()
Dim numbers() As UShort = { UInt16.MinValue, 121, 12345, UInt16.MaxValue }
Dim result As Decimal
For Each number As UShort In numbers
result = Convert.ToDecimal(number)
Console.WriteLine("Converted the UInt16 value {0} to {1}.", _
number, result)
Next
End Sub
End Module
Related examples in the same category