K
K
kykyryky2015-03-26 08:32:11
Programming
kykyryky, 2015-03-26 08:32:11

How to convert a double number to a string while keeping the decimal form?

There is a code:

double x = 0.00000001;
string str = Convert.ToString(x);

As a result, the line contains "1E-8". How to save the number format and get the string "0.00000001"?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oscar Django, 2015-03-26
@kykyryky

https://msdn.microsoft.com/en-us/library/kfsatb94(v=vs.110).aspx _

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question