Byte.ToString (String) converts Byte to string using the specified format.
Imports System
Class Sample
Public Shared Sub Main()
Dim formats() As String = {"C3", "D4", "e1", "E2", "F1", "G", _
"N1", "P0", "X4", "0000.0000"}
Dim number As Byte = 240
For Each format As String In formats
Console.WriteLine("'{0}' format specifier: {1}", _
format, number.ToString(format))
Next
End Sub
End Class
Related examples in the same category