String format: {0, 0:#.#}, {0, 0:#.###}, {0, 0:#.#####} (4) : String Format « Data Type « VB.Net Tutorial






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
1.2
1.235
1.23457








2.34.String Format
2.34.1.String.Format: {0,10:p}
2.34.2.String.Format: {0:#,### ; #.## ,00##,00}
2.34.3.String.Format: {0:##.## ; -##.# ; 0.0#} (2)
2.34.4.String.Format: {0:##.## ; (##.00) ; 0.0#} (3)
2.34.5.String format: {0, 1:D}
2.34.6.String format: {0, 7:F1}
2.34.7.String format: {0, 0:#.#}, {0, 0:#.###}, {0, 0:#.#####} (4)