Numeric Formatting : Number format : Data Type C# Examples


C# Examples » Data Type » Number format »

 

Numeric Formatting









    
using  System;

class  MainClass
{
        public  static  void  Main()
        {
                Console.WriteLine("{0:F}",  12345.8977);
                Console.WriteLine("{0:F0}",  12314.8977);
                Console.WriteLine("{0:F5}",  5431123.8977);
        }
}
    
   
  
   



Output

12345.90
12315
5431123.89770


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Data Type
» Number format