What's going on here?
Convert.ToDouble("1.3")
I have a string with the value "1.3". When I convert to double, it returns 13. I want to return 1.3.
It probably has to do with your current culture, it uses another decimal separator symbol than .
. You can do this instead:
double.Parse("1.3", CultureInfo.InvariantCulture);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With