Friday, December 20, 2013

Determine Decimal Separator

Often it can be of advantage or even neccessary to determine the decimal separator of the current system or current user, for example to convert inputted numbers to the right format. In C# we can achieve this information with the class CultureInfo:

string DecimalSeparator = System.Globalization.CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator;

No comments:

Post a Comment