Double value Format Strings: G : Double Format « Data Types « VB.Net






Double value Format Strings: G

 
Imports System.Globalization
Module Example
    Sub Main()
        
        Dim number As Double
        
        number = 12345.6789      
        Console.WriteLine(number.ToString("G", CultureInfo.InvariantCulture))

    End Sub
End Module

   
  








Related examples in the same category

1.Double data Calculation and FormatDouble data Calculation and Format
2.Double value Format Strings: F3 and specific culture
3.Double value Format Strings: G and specific culture
4.Double value Numeric Format Strings: G7
5.Double value Numeric Format Strings: G and InvariantCulture
6.Double ToString("P",CultureInfo.CreateSpecificCulture("hr-HR"))
7.Double ToString("P1", CultureInfo.InvariantCulture)
8.Double format: r
9.Double format: ToString("r",CultureInfo.CreateSpecificCulture("fr-FR"))
10.CultureInfo("en-us") Double value format: C
11.CultureInfo("en-us") Double format: E03
12.CultureInfo("en-us") Double format: F04
13.Format Double value with G
14.Format Double value with N
15.Format Double value with P
16.CultureInfo("en-us") and Double format: R
17.Double format: P
18.Standard Numeric Format Strings: C
19.Standard Numeric Format Strings: C3
20.Standard Numeric Format Strings: C3 and specific culture
21.Standard Numeric Format Strings: D
22.Standard Numeric Format Strings: D8
23.Standard Numeric Format Strings: E
24.Standard Numeric Format Strings: E10
25.Standard Numeric Format Strings: e4
26.Standard Numeric Format Strings: E
27.Standard Numeric Format Strings: F
28.Standard Numeric Format Strings: F
29.Standard Numeric Format Strings: F0
30.Standard Numeric Format Strings: F1
31.ToString("G", CultureInfo.InvariantCulture)
32.ToString("G2", CultureInfo.InvariantCulture)
33.ToString("G5", CultureInfo.InvariantCulture)
34.ToString("N", CultureInfo.InvariantCulture)
35.ToString("N1",CultureInfo.CreateSpecificCulture("sv-SE"))