C# Double - ToString formatting with two decimal places and no rounding

Posted by iulianchira on Stack Overflow See other posts from Stack Overflow or by iulianchira
Published on 2010-03-16T11:40:21Z Indexed on 2010/03/16 11:46 UTC
Read the original article Hit count: 330

Filed under:
|
|

How can i format a Double to String in c# so as to have only two decimal digits?

If I use String.Format("{0:0.00}%", myDoubleValue) the number is rounded, and i want a simple truncate without rounding. Also, I want the conversion to String to be culture sensitive.

© Stack Overflow or respective owner

Related posts about c#

Related posts about tostring