How do I format a Double to a String in C# so as to have only two decimal places?
If I use String.Format("{0:0.00}%", myDoubleValue) the number is then rounded and I want a simple truncate without any rounding. I also want the conversion to String to be culture sensitive.
I use the following:
For instance:
If the number is 50.947563 and you use the following, the following will happen:
And there’s your answer truncated, now to format the string simply do the following: