I have the following case, from the client side I am getting a double value in a string, this can either be in 'en-GB' format or 'de' format, i.e 123.10 or 123,10. However I need to convert both these number to 123.10. i.e I tried writing the following test using NumberFormatInfo, however it does not pass:
var format = new NumberFormatInfo { NumberGroupSeparator = ",", NumberDecimalSeparator = "." };
var a = Double.Parse("23000.10", format);
var b = Double.Parse("23000,10", format);
Assert.AreEqual(a,b);
What am I doing wrong?