You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running the unit tests on a PC with .Net in Italian ("it-IT" ) it does not pass.
Coordinate.csTryParse() assumes the current Thread culture use dot as decimal separator.
method should use the double.Parse() and double.TryParse() overrides with NumberStyles and IFormatProvider parameters as I seen in other classes.
Example: var deg1 = double.Parse(match.Groups["Deg1"].Value);
should be: var deg1 = double.Parse(match.Groups["Deg1"].Value, CultureInfo.InvariantCulture);
double.TryParse(match.Groups["Min1"].Value, out temp)
should be: double.TryParse(match.Groups["Min1"].Value, NumberStyles.None, CultureInfo.InvariantCulture, out temp)
I'm not sure NumberStyles.None is the best choice, but it works.
Alex
The text was updated successfully, but these errors were encountered:
Running the unit tests on a PC with .Net in Italian ("it-IT" ) it does not pass.
Coordinate.cs TryParse() assumes the current Thread culture use dot as decimal separator.
method should use the double.Parse() and double.TryParse() overrides with NumberStyles and IFormatProvider parameters as I seen in other classes.
Example:
var deg1 = double.Parse(match.Groups["Deg1"].Value);
should be:
var deg1 = double.Parse(match.Groups["Deg1"].Value, CultureInfo.InvariantCulture);
double.TryParse(match.Groups["Min1"].Value, out temp)
should be:
double.TryParse(match.Groups["Min1"].Value, NumberStyles.None, CultureInfo.InvariantCulture, out temp)
I'm not sure NumberStyles.None is the best choice, but it works.
Alex
The text was updated successfully, but these errors were encountered: