I need to parse a string to a decimal and it might be used in the UK or a european culture.
If in a european culture 2,00 would be 2
However, 2,00 would be invalid in the UK culture as a comma denotes a thousand.
If i use
Double.Parse("20,50", new CultureInfo("en-GB"))
it returns 2050
I would have expected this to throw an invalid exception.
Can anyone help?
2050, not20.50. Have you changed the settings of the UK regional settings in the control panel and set the decimal separator to,?