Public Class Tester
Public Shared Sub Main
Console.WriteLine(String.Format("{0:#,### ; #.## ,00##,00}",1232.2345))
End Sub
End Class
Module Module1
Sub Main()
Dim A As Double = 1.23456789
Console.WriteLine("{0, 0:#.#}", A)
Console.WriteLine("{0, 0:#.###}", A)
Console.WriteLine("{0, 0:#.#####}", A)
End Sub
End Module
Public Class Tester
Public Shared Sub Main
Console.WriteLine(String.Format("{0:##.## ; (##.00) ; 0.0#}", 0))
End Sub
End Class
Public Class Tester
Public Shared Sub Main
Console.WriteLine(String.Format("{0:##.## ; -##.# ; 0.0#}", -1235.33))
End Sub
End Class
Public Class Tester
Public Shared Sub Main
Console.WriteLine(String.Format("{0,10:p}", 0.32))
End Sub
End Class
Module Module1
Sub Main()
Dim A As Double = 1.23456789
Console.WriteLine("{0, 1:D} {1, 2:D} {2, 3:D}", 1, 2, 3)
End Sub
End Module
Module Module1
Sub Main()
Dim A As Double = 1.23456789
Console.WriteLine("{0, 7:F1} {1, 7:F3} {2, 7:F5}", A, A, A)
End Sub
End Module