How to convert double to string without the power to 10 representation (E-05)

后端 未结 4 1639
死守一世寂寞
死守一世寂寞 2020-12-01 16:42

How to convert double to string without the power to 10 representation (E-05)

double value = 0.000099999999833333343;
string text = value.ToString();
Consol         


        
4条回答
  •  既然无缘
    2020-12-01 17:20

    Use string.Format with an appropriate format specifier.

    This blog post has a lot of examples: http://blogs.msdn.com/kathykam/archive/2006/03/29/564426.aspx

提交回复
热议问题