Menu

#1 error parsing double values on german systems

open
nobody
None
5
2010-09-09
2010-09-09
No

Values of the type double might be misinterpreted on german systems because they are parsed with the locale culture setting. For example the value 12.000 is misinterpreted as 12,000 on german systems.

To avoid this, double values should be parsed with the invariant culture setting:
double value = double.Parse("12.000", System.Globalization.CultureInfo.InvariantCulture);

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.