Floating Number and Files

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a number 0,00001 and when I call the ToString() method to write it to a file a get 1 * 10 ^ -5 , how can I get in the file the number with the exactly same signature....?
Thank in advantage.
 
ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/cpguide/html/cpconstandardnum
ericformatstrings.htm
maybe this will help you

Hector Y. Martinez said:
I have a number 0,00001 and when I call the ToString() method to write
it to a file a get 1 * 10 ^ -5 , how can I get in the file the number with
the exactly same signature....?
 
Try this
string test;
double flt = 0.00001;
test= flt.ToString("0.00000") ;
 

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