Format with {0 : String Format : Data Types C# Source Code


Custom Search

C# Source Code » Data Types » String Format »

 

Format with {0








    
 
using System;
using System.Globalization;
using System.Text;

public class NumParsingApp {
    public static void Main(string[] args) {

        string u = "AA -1,234,567.890  ";
        NumberFormatInfo ni = new NumberFormatInfo();
        ni.CurrencySymbol = "AA";
        double h = Double.Parse(u, NumberStyles.Any, ni);
        Console.WriteLine("h = {0:F}", h);
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Data Types
» String Format