M
Matt
Hi there,
I'm having a weird situation when converting strings to double.
Normally, the following code would work right?
double MyDouble = double.Parse("20.50"); // Error at runtime
Well, it gives me an error at run time, telling me that the format of
the input string is incorrect. Then, if i try with a comma instead of
a dot, it works fine.
double MyDouble = double.Parse("20,50"); // Works fine
Isn't it supposed to be a dot that works? I think it could be related
to "Regional and Language Options" in WinXP. I'm using french canadian
regional options if it can gives you a hint. And if it is really
related to regional and language options, what should i change
exactly?
If anyone has an idea how to make it works with a dot that would be
great. I want understand why it doesn't works. Thanks!
I'm having a weird situation when converting strings to double.
Normally, the following code would work right?
double MyDouble = double.Parse("20.50"); // Error at runtime
Well, it gives me an error at run time, telling me that the format of
the input string is incorrect. Then, if i try with a comma instead of
a dot, it works fine.
double MyDouble = double.Parse("20,50"); // Works fine
Isn't it supposed to be a dot that works? I think it could be related
to "Regional and Language Options" in WinXP. I'm using french canadian
regional options if it can gives you a hint. And if it is really
related to regional and language options, what should i change
exactly?
If anyone has an idea how to make it works with a dot that would be
great. I want understand why it doesn't works. Thanks!