Mega Code Archive

 
Categories / C# Book / 02 Essential Types
 

0316 NumberFormatInfo and Culture

The following code creates a NumberFormatInfo from current cultrue by clone() method. using System; using System.Text; using System.Globalization; class Sample { public static void Main() { NumberFormatInfo f = (NumberFormatInfo)CultureInfo.CurrentCulture.NumberFormat.Clone(); } }