Format display of float variables

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi,

I have varaiables declared as float, the result of .ToString() is like
1.0000. How can I get rid of the 0s in the decimal? e.g. 1.0000 will be 1
and 1.3500 will be 1.35

TIA
 

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