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.
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