Convert.ToChar Method (Byte)
.NET Framework (current version)
Converts the value of the specified 8-bit unsigned integer to its equivalent Unicode character.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- value
-
Type:
System.Byte
The 8-bit unsigned integer to convert.
The following example converts an array of unsigned bytes to Char values.
Dim bytes() As Byte = {Byte.MinValue, 40, 80, 120, 180, Byte.MaxValue} Dim result As Char For Each number As Byte In bytes result = Convert.ToChar(number) Console.WriteLine("{0} converts to '{1}'.", number, result) Next ' The example displays the following output: ' 0 converts to ' '. ' 40 converts to '('. ' 80 converts to 'P'. ' 120 converts to 'x'. ' 180 converts to '''. ' 255 converts to 'ÿ'.
Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Show: