Format : Console Output Format : Development C# Examples


C# Examples » Development » Console Output Format »

 

Format









    
using  System;

class  MainClass
{
      static  void  Main()
      {
            double  MyDouble  =  12.345678;

            Console.WriteLine("{0,-10:F4}  --  Fixed  Point,  4  decimal  places",  MyDouble);
      }
}
    
   
  
   



Output

12.3457    -- Fixed Point, 4 decimal places


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Development
» Console Output Format