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