Convert ToDouble returns always a whole number ?

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

Hi all,

Convert.ToDouble("1.5") returns 15 is there a other way to convert the "1.5"
to double 1.5 ????

Thanks

Peter.
 
Thanks Joseph

Sorry, I've got it , it's a cultureInfo thing :

MessageBox.Show(System.Convert.ToDouble("1,5").ToString("0.0")); returns
OK

MessageBox.Show(System.Convert.ToDouble("1.5").ToString("0.0")); returns
for me a whole number



Peter.


Mes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top