How to retrieve the values of "Customize Regional Options" on WinXP "Rigional and language Options" programmatically, such as "Decimal symbol" or "Digit Grouping symbol"
THANKS!
Visual C# General
How to retrieve the values of "Customize Regional Options" on WinXP "Rigional and language Options" programmatically, such as "Decimal symbol" or "Digit Grouping symbol"
THANKS!
This information is managed by the CultureInfo and friends class. The NumberFormat property (of type NumberFormatInfo) contains the currency info. The DateTimeFormat property (of type DateTimeFormatInfo) contains date and time formatting.
Michael Taylor - 5/1/07
You can use the following properties to return the info as a string:
System.Threading.Thread.CurrentThread.CurrentCulture.NumberFormat.NumberDecimalSeparator
System.Threading.Thread.CurrentThread.CurrentCulture.NumberFormat.NumberGroupSeparator
See also this link for the NumberFormatInfo class which shows other properties available:
http://msdn2.microsoft.com/en-us/library/system.globalization.numberformatinfo_members.aspx