format double as percentage - show all decimals?

Viewed 2723

I can't find a way to format a double as a percentage showing all decimals in C# 4.0.

Using {0:P} has the same effect as {0:P2}, i.e. formatting as a percentage, showing two decimals strictly.

I finally went for substituting the problematic {0:P} with {0:0.################################%}. For my purpose, my doubles do not reach that many decimals.

5 Answers
Related