Ok time for the 2nd dumb question of the day that I should probably already know the answer too..
I have string.Format(" {0, -22} | {1, 5} of {2, -5} | {3, 5}% |
where {3}
is a double that is being used for a percentage.
The longest allowed format is 5 characters so capable of support something like 99.99
I currently use string.Format("{0:#.00}", x)
for the number going into there which works fine for say 64.29
However for other numbers it doesn't display cleanly.
I want to be able to have like:
100%
90%
90.8%
80.70%
1%
1.5%
So basically looking for a more flexible formatting pattern to put instead of {0:#.00}