0

Here is my c# codes :

double amount_dbl = double.Parse("0.00001167");
string amount_str = amount_dbl.ToString();

amount_str is 1.167E-05
How can i get 0.00001167 after ToString()?

SilverLight
  • 19,668
  • 65
  • 192
  • 300
  • Try ToString("D") to specify the format – doctorlove Jan 17 '22 at 11:51
  • Define the format you want in the call to ToString. There is an overload for that.Be aware that the way you convert here is culture dependent. It may result in something unexpected on systems with a different culture setting. – Ralf Jan 17 '22 at 11:52
  • 1
    Does this answer your question? [Double to string conversion without scientific notation](https://stackoverflow.com/questions/1546113/double-to-string-conversion-without-scientific-notation) – Isparia Jan 17 '22 at 11:52

0 Answers0