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:C}  --  Currency",  MyDouble);
      }
}
    
   
  
   



Output

$12.35     -- Currency


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Development
» Console Output Format