Hi Michal,
<us**@domain.invalid> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hello
i have problems with this function, always thru exception
for all data, for example: Convert.ToDouble("545.0"). Why ?
I want to convert string data in different format into double,
i have formats like:
37.439351
2.00000e+02
How can i do it most easily ?
Thanx
Michal
The only reason I can figure that the above code would cause an
exception is if the number is not in a valid format for your current
culture. If you specify the invariant culture does it still cause an
exception?:
double val = Convert.ToDouble("545.0", CultureInfo.InvariantCulture);
CultureInfo is in the System.Globalization namespace.
Regards,
Daniel