Format double value : Console Output Format : Development C# Examples


C# Examples » Development » Console Output Format »

 

Format double value









    
using  System;    
    
class  Example  {    
    public  static  void  Main()  {    
        double  s1  =  1231234.123412341234;  

        Console.WriteLine("{0:#.###}.",  s1);  
  
    }    
}
    
   
  
   



Output

1231234.123.


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Development
» Console Output Format