How can I round a decimal to at least 2 decimal places and have it kept as a decimal?
I know I can do this, but it has a code smell.
var myResult = Decimal.Parse(myDecimal.ToString("0.00##"));
These are the expected results.
0.028 -> 0.028
0.02999 -> 0.03
a
decimaldoesnt (or, perhaps shouldn’t) have a “number of decimal places” until you format it for display.