Why Is ToString() Rounding My Double Value?

Posted by user163757 on Stack Overflow See other posts from Stack Overflow or by user163757
Published on 2010-01-20T21:27:05Z Indexed on 2010/04/04 15:53 UTC
Read the original article Hit count: 525

Filed under:
|
|

How do I prevent my double value from being rounded when converting to a string? I have tried both Convert.ToString and ToString() with the same result.

For example my double may look something like 77.987654321, and the two strings conversions convert to to 77.98765. I need to keep the precision of the value as is.

© Stack Overflow or respective owner

Related posts about .NET

Related posts about tostring