Display using scientific notation : Double Format : Data Type C# Examples


C# Examples » Data Type » Double Format »

 

Display using scientific notation









    
using  System;    

class  MainClass  {    
    public  static  void  Main()  {    
        double  num  =  64354.2345;  

        Console.WriteLine("Default  format:  "  +  num);  

        Console.WriteLine("Use  scientific  notation:  "  +  
                                            "{0:#.###e+00}",  num);  

    }  
}
    
   
  
   



Output

Default format: 64354.2345
Use scientific notation: 6.435e+04


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Data Type
» Double Format