Use NumberFormatInfo to format a number : NumberFormatInfo : Development Class C# Source Code


Custom Search

C# Source Code » Development Class » NumberFormatInfo »

 

Use NumberFormatInfo to format a number








    



using System;
using System.Globalization;
public class MainClass {
    public static void Main() {

        NumberFormatInfo f = new NumberFormatInfo();
        f.CurrencySymbol = "$$";
        Console.WriteLine(3.ToString("C", f));          // $$ 3.00

    }
}
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Development Class
» NumberFormatInfo