Convert.ToChar (UInt64) converts 64-bit unsigned integer to Unicode character.
Class Sample
Public Shared Sub Main()
Dim numbers() As ULong = { UInt64.MinValue,1028, Int64.MaxValue }
Dim result As Char
For Each number As ULong In numbers
Try
result = Convert.ToChar(number)
Console.WriteLine("{0} converts to '{1}'.", number, result)
Catch e As OverflowException
Console.WriteLine("{0} is outside the range of the Char data type.", _
number)
End Try
Next
End Sub 'Main
End Class 'Sample
Related examples in the same category