how to convert this

  • Thread starter Thread starter Praveen
  • Start date Start date
P

Praveen

got a string a="2.3944864845405107E+18"

how to convert this into a valid number. which method to use..
I was using Convert.ToInt64(a); which is going to exception.


thanks
Praveen
 
got a string a="2.3944864845405107E+18"
Secondly: Converting a string to a double is language dependent, - in
German, Norwegian and French as an example the expected decimal
separator is a comma ',', instead of a period (.).

I'm curious as to what will happen if you try converting this on a German
locale as it is a number in standard form and and wonder if it is an
exception or not. Could you try?
 
Peter said:
I'm curious as to what will happen if you try converting this on a German
locale as it is a number in standard form and and wonder if it is an
exception or not. Could you try?

You can try it yourself just specifying a german culture as second
argument.

Arne
 

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