Format the same argument three different ways : Console Output : Development C# Examples


C# Examples » Development » Console Output »

 

Format the same argument three different ways









    
using  System;      
      
class  MainClass  {      
    public  static  void  Main()  {      
  

        Console.WriteLine("{0:F2}    {0:F3}    {0:e}",  10.12345);      
      
    }      
}
    
   
  
   



Output

10.12  10.123  1.012345e+001


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Development
» Console Output