Class Sample
Public Shared Sub Main()
Dim bases() As Integer = { 2, 8, 10, 16}
Dim numbers() As Byte = { Byte.MinValue, 12, 103, Byte.MaxValue}
For Each base As Integer In bases
Console.WriteLine("Base {0} conversion:", base)
For Each number As Byte In numbers
Console.WriteLine(" {0,-5} --> 0x{1}", _
number, Convert.ToString(number, base))
Next
Next
End Sub
End Class