Converts Integer to string using the specified format.
Imports System
Imports Microsoft.VisualBasic
Module MainClass
Sub Main( )
Dim value As Integer = -99999
Dim specifier As String
specifier = "G"
Console.WriteLine("{0}: {1}", specifier, value.ToString(specifier))
specifier = "C"
Console.WriteLine("{0}: {1}", specifier, value.ToString(specifier))
specifier = "D8"
Console.WriteLine("{0}: {1}", specifier, value.ToString(specifier))
specifier = "E4"
Console.WriteLine("{0}: {1}", specifier, value.ToString(specifier))
specifier = "e3"
Console.WriteLine("{0}: {1}", specifier, value.ToString(specifier))
specifier = "F"
Console.WriteLine("{0}: {1}", specifier, value.ToString(specifier))
specifier = "N"
Console.WriteLine("{0}: {1}", specifier, value.ToString(specifier))
specifier = "P"
Console.WriteLine("{0}: {1}", specifier, (value/100000).ToString(specifier))
specifier = "X"
Console.WriteLine("{0}: {1}", specifier, value.ToString(specifier))
specifier = "0,0.000"
Console.WriteLine("{0}: {1}", specifier, value.ToString(specifier))
specifier = "#,#.00#;(#,#.00#)"
Console.WriteLine("{0}: {1}", specifier, (value*-1).ToString(specifier))
End Sub
End Module
Related examples in the same category