Reputation: 2634
I would like to know is there is simple way to convert double value to a string as it is in C#? I used .ToString("R")
and default .ToString()
but it doesn't works.
Here is some test examples 0.00000000000000000000000001 gives me string 1.0E-26 and 29.999999999999999999994 converts to 30.0. I don't want that. How such representation can be avoided?
Upvotes: 0
Views: 196
Reputation: 45135
What representation do you want?
Check the MSDN for both standard and custom formatiing strings.
Upvotes: 2