Hello everybody.
When I try to convert a string to a numeric value with Parse or TryParse or Convert.ChangeType, I can't manage de thousand separator as it is defined in the system:
if I enter :
var d = double.Parse("1,234", CultureInfo.CurrentUICulture);
it does not return 1234.
If I want to use the group separator, I must type :
var d = double.Parse("1,234", NumberStyles.Number, CultureInfo.CurrentUICulture);
This time, the result is that one expected.
But, I don't want to force the use of the thousand separator, I want use it only if the system specify it in the globalization settings. Is there a way to know if the separator is used (I know that I can read the group separator in CultureInfo.CurrentUICulture.NumberFormat.NumberGroupSeparator
)
Cheers Loic