Format : Console Output Format : Development C# Examples


C# Examples » Development » Console Output Format »

 

Format









    
using  System;

class  MainClass
{
      static  void  Main()
      {
            Console.WriteLine("The  value:  {0}.",  500);          //  Print  out  number.
            Console.WriteLine("The  value:  {0:C}.",  500);      //  Format  as  currency.
      }
}
    
   
  
   



Output

The value: 500.
The value: $500.00.


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Development
» Console Output Format