Converting double to string

  • Thread starter Thread starter Tomá¹ Machala
  • Start date Start date
T

Tomá¹ Machala

Hi,
If i use method Convert.ToString(anyDouble) to convert double to string, it
sometimes return something like "2.45e6". Is there any other method that
always return string in natural format? Eg. "345000" instead of "3.45e5"?
Thanks.
 
Tomá¹,

In order to do this, you will have to call the ToString method on the
Double structure, passing a format of "D" (I believe). This should give it
to you in decimal format, not exponential format.

Hope this helps.
 

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