Decimal format: G, C, F : Decimal 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 » Decimal FormatScreenshots 
Decimal format: G, C, F
  

Imports System
Imports Microsoft.VisualBasic
Imports System.Globalization
Module MainClass
    Sub Main( )
        Dim value As Decimal = -99999.62d
        ' Display value using default ToString method.
        Console.WriteLine(value.ToString())           
        ' Display value using some standard format specifiers.
        Console.WriteLine(value.ToString("G"))        
        Console.WriteLine(value.ToString("C"))        
        Console.WriteLine(value.ToString("F"))        
    End Sub 
End Module 

   
    
  
Related examples in the same category
1.Decimal format: C
2.Decimal format: E04
3.Decimal format: F
4.Decimal format: N
5.Decimal format: P
6.Decimal format: 0,0.000
7.Decimal format: #,#.00#;(#,#.00#)
8.Decimal.ToString Method Converts Decimal to string using the specified format and culture-specific format information.
9.Decimal format: C and specific Culture
10.Decimal format: E04 and Culture
11.Decimal format: F and Culture
12.Decimal format: N and Culture
13.Decimal format: P and Culture
14.Standard Numeric Format Strings: C2
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.