N
N
Nikita Kochetkov2016-03-22 16:44:30
C++ / C#
Nikita Kochetkov, 2016-03-22 16:44:30

How to convert a number to a string without losing form?

There is a number, for example 0.0000000000000001. When translated to string, it produces 1E-16.
How to convert a number to a string without converting the number to exponential form?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Sydorenko, 2016-03-22
@San40

If the task is to get rid of the exponential form, then this solution is suitable

string formatted = String.Format("{0:F20}", value);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question