Numeric Formatting : Currency : Data Type C# Examples


C# Examples » Data Type » Currency »

 

Numeric Formatting









    
using  System;

class  MainClass
{
        public  static  void  Main()
        {
                Console.WriteLine("{0:C}",  1234.8977);
                Console.WriteLine("{0:C}",  -1234.8977);
        }
}
    
   
  
   



Output

$1,234.90
-$1,234.90


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Data Type
» Currency