How do I convert a decimal to an int?
Rounding a decimal to the nearest integer
decimal a ; int b = (int)(a + 0.5m);
when a = 49.9, then b = 50
a = 49.9
b = 50
when a = 49.5, then b = 50
a = 49.5
when a = 49.4, then b = 49 etc.
a = 49.4
b = 49