Custom double value format: 0.00 : Numeric Format « Data Types « VB.Net





Custom double value format: 0.00

 

Imports System.Globalization

Module Example
    Public Sub Main()

        Dim value As Double
        value = 1.2
        Console.WriteLine(value.ToString("0.00", CultureInfo.InvariantCulture))
    End Sub
End Module

   
  










Related examples in the same category

1.Standard Numeric Format Strings: C2
2.Standard Numeric Format Strings: C, C3
3.Standard Numeric Format Strings: D
4.Standard Numeric Format Strings for negative value: D
5.Standard Numeric Format Strings: E,e
6.Standard Numeric Format Strings: F
7.Standard Numeric Format Strings: G
8.Standard Numeric Format Strings: N
9.Standard Numeric Format Strings: N
10.Standard Numeric Format Strings: P
11.Standard Numeric Format Strings: r
12.Standard Numeric Format Strings: X, x
13.Custom double value format: 00000
14.Custom double value format: 00.00
15.Custome double value format: 00.00 and CultureInfo.CreateSpecificCulture("da-DK")
16.Double value format: 0.0
17.Double value format: #,#
18.Double value format: #,# and CultureInfo.CreateSpecificCulture("el-GR")
19.Custome number format: ToString("#.##", CultureInfo.InvariantCulture)
20.Double value format: ToString("[##-##-##]")
21.Double value format: ToString("#")
22.Double value format: (###) ###-####
23.Number format: #,#
24.Number format: #,##0,,
25.Number format: #,,
26.Number format: #,,,
27.Number format: #,##0,,
28.Double number format: "#0.##%"
29.Format with custom character
30.Double value format: 0.###E+0
31.Double value format: 0.###E+000
32.Double value format: 0.###E-000
33.Format escape: \#
34.Format escape: \\(back slash)
35.Positive double value format: ##;(##)
36.Negative double value format: ##;(##)
37.Double value format: ##;(##);**Zero**
38.Double value format: (###) ###-####
39.Integer format: #
40.Number format: 0.0 vs #,#
41.Number format: ###-####
42.Number format: 0 and #
43.Number format: 0, # and ,
44.Number format: #,,,
45.Number format: #0.##%
46.Number format: CultureInfo.InvariantCulture
47.Number format: E
48.Number format: escape
49.Number format: free text
50.Number format: phone number format
51.Add free text to number format
52.Double.ToString Method and Number format
53.Number format and Culture info:G
54.Number format and Culture info: C
55.Number format and Culture info:E04
56.Number format and Culture info:F
57.Number format and Culture info:N
58.Number format and Culture info:P
59.Converts string in style and culture-specific format to double
60.Integer format: X
61.Format Enum: "G", "F", "D", "X"
62.Byte value format: X4
63.Date format: D
64.Custom format with ToString
65.Format Date value: %M
66.Date value format: MMMM dd, yyyy (dddd)
67.Decimal format: C3
68.Implements IFormatProvider, ICustomFormatter