I'd like to format my number as a percent value with an always visible sign.
To format it as a percent value I can do:
string.Format("{0:P2}", 1.45);
For visible signs I'll do:
string.Format("{0:+#.##;-#.##;0}", 1.45);
Any way to combine the two?
string.Format
. The readability improvements are dramatic.(1.45 < 0 ? "-" : "+") + String.Format("{0:P2}", 1.45);
, provided your .NET version predicament