1
Vote

Double values won't parse in some cultures

description

The following code won't parse a double value with a decimal point if the current culture has a different decimal symbol (e.g, comma).

if (double.TryParse(jsonString, NumberStyles.AllowExponent | NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint, null, out result_double)) return result_double;

Need to be able to specify culture explicitly and probably use CultureInfo.InvariantCulture by default.

comments