S
schaf
Hi NG!
I have a little question about the localization of a double.
If I use the CultureInfo "en-US" I have the following behavior:
1.) If I enter the value 2.5 into a textbox the
double.Parse(text1.Text) returns 2.5 as expected.
2.) If I enter the value 2,5 into a textbox the
double.Parse(text1.Text) returns 25...why 25 and not 2500. The , is
the group-separator.
Is it possible to ignore these behavior to ensure the 2,5 and 2.5 will
always be interpreted as 2.5 9like in the calculator) ? Or do I have
to implement this behavior by my self?
Regards
Marcel
I have a little question about the localization of a double.
If I use the CultureInfo "en-US" I have the following behavior:
1.) If I enter the value 2.5 into a textbox the
double.Parse(text1.Text) returns 2.5 as expected.
2.) If I enter the value 2,5 into a textbox the
double.Parse(text1.Text) returns 25...why 25 and not 2500. The , is
the group-separator.
Is it possible to ignore these behavior to ensure the 2,5 and 2.5 will
always be interpreted as 2.5 9like in the calculator) ? Or do I have
to implement this behavior by my self?
Regards
Marcel