This is driving me crazy. I have the following string in a ASP.NET 2.0 WebForm Page
string s = \"0.009\";
Simple enough. Now, if my culture
You have it backwards.
When you say double d = Double.Parse(s, new CultureInfo("es-ES"));, you are asking .NET to parse your string into a double, assuming that the string is written in the es-ES culture.
In Spanish culture, "." is a thousands separator, so "0.009" is 9.
When you convert using ToString(), at the end, it's saying convert 0.009 to a string using the spanish culture, so it uses "," as the decimal separator, and you get "0,009". The behavior is correct.
My guess is that you want to use Double.Parse with the Invariant Culture, and ToString with the spanish culture, so 0.009 becomes 0,009.