Parsing values out of strings using culture independend settings

When parsing a value out of a string the current separator is used. In English this is a dot. In other languages a comma is being used.
When parsing a string the current culture setting is being used!

To ensure the dot is being used as separator use the method below:

double value = Convert.ToDouble(text, CultureInfo.InvariantCulture);
Lastest update in March 2012, inital post in March 2012

Write a comment

I appreciate comments, suggestions, compliments etc. Unfortunately I have no time to reply to them. Useful input will be used for sure!