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