Module Example
Public Sub Main()
Dim numbers() As Double = {9999.9999, -9999.8377, 1.0437E21, _
-1.9999e-05}
Dim specifiers() As String = { "C", "E", "e", "F", "G", "N", "P", _
"R", "#,000.000", "0.###E-000", _
"000,000,000,000.00###" }
For Each number As Double In numbers
Console.WriteLine("Formatting of {0}:", number)
For Each specifier As String In specifiers
Console.WriteLine(" {0,5}: {1}", _
specifier, number.ToString(specifier))
Next
Console.WriteLine()
Next
End Sub
End Module