Standard Numeric Format Strings: F1 : Double Format « Data Types « VB.Net

Home
VB.Net
1.2D
2.Application
3.Class
4.Data Structure
5.Data Types
6.Database ADO.net
7.Date Time
8.Development
9.Event
10.File Directory
11.Generics
12.GUI
13.Internationalization I18N
14.Language Basics
15.LINQ
16.Network Remote
17.Reflection
18.Security
19.Thread
20.Windows Presentation Foundation
21.Windows System
22.XML
23.XML LINQ
VB.Net » Data Types » Double FormatScreenshots 
Standard Numeric Format Strings: F1
 
Imports System.Globalization
Module Example
    Sub Main()

        Dim doubleNumber As Double
        
        doubleNumber = -1898300.1987
        Console.WriteLine(doubleNumber.ToString("F1", CultureInfo.InvariantCulture))  
        ' Displays -1898300.2
    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
4.Double value Format Strings: G and specific culture
5.Double value Numeric Format Strings: G7
6.Double value Numeric Format Strings: G and InvariantCulture
7.Double ToString("P",CultureInfo.CreateSpecificCulture("hr-HR"))
8.Double ToString("P1", CultureInfo.InvariantCulture)
9.Double format: r
10.Double format: ToString("r",CultureInfo.CreateSpecificCulture("fr-FR"))
11.CultureInfo("en-us") Double value format: C
12.CultureInfo("en-us") Double format: E03
13.CultureInfo("en-us") Double format: F04
14.Format Double value with G
15.Format Double value with N
16.Format Double value with P
17.CultureInfo("en-us") and Double format: R
18.Double format: P
19.Standard Numeric Format Strings: C
20.Standard Numeric Format Strings: C3
21.Standard Numeric Format Strings: C3 and specific culture
22.Standard Numeric Format Strings: D
23.Standard Numeric Format Strings: D8
24.Standard Numeric Format Strings: E
25.Standard Numeric Format Strings: E10
26.Standard Numeric Format Strings: e4
27.Standard Numeric Format Strings: E
28.Standard Numeric Format Strings: F
29.Standard Numeric Format Strings: F
30.Standard Numeric Format Strings: F0
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"))
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.