dvplayltd
asked on
C# How to convert double to string with present all digitals numbers ?
Hi experts!
Im using C# 2008. I have a double variable which I need to convert to string. With this code it work, but last 2 digitals are truncate. I need all digital, no matter they are 2,6, 10 or more !
Here you code
dtDOuble = 40110.440049189812;
dtDOuble.ToString() is "40110.4400491898"
Look last 2 digital are lost.
What code I need to make sure that in string I have all digitals ?
Im using C# 2008. I have a double variable which I need to convert to string. With this code it work, but last 2 digitals are truncate. I need all digital, no matter they are 2,6, 10 or more !
Here you code
dtDOuble = 40110.440049189812;
dtDOuble.ToString() is "40110.4400491898"
Look last 2 digital are lost.
What code I need to make sure that in string I have all digitals ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
10x
Since you are working with doubles, the accurate precision is somewhat limited, but you can get a better presentation by specifying the notation you would like to use.
See http://msdn.microsoft.com/