How to best approach rounding up decimals in C#
AFAIK, ToString( "0.##" ) will do, just increase number of # so that your value won't round up. E.g.:
decimal d = 1.999m;
string dStr = d.ToString("0.###");
This will generate "1,999" string (delimiter depends upon used culture).
As a result, you can use common very long formatting string: "0.############################"
- to format all your values.
So trim the zeroes from the end.
decimal d = 1.999m;
string dStr = d.ToString().TrimEnd('0').TrimEnd('.');