NumericExtensions

NumericExtensions is a public static class in the Extensions Namespace. It does not contain extension methods, but it does contain useful methods for manipulating numbers.

RoundUp
This rounds a Decimal up to the nearest integral value. For example, 5.1 will be rounded to 6, and 7.8 will be rounded to 8.

RoundDown
This rounds a Decimal down to the nearest integral value. For example, 5.1 will be rounded to 5, and 7.8 will be rounded to 7.

RoundNearest
This rounds a Decimal to the nearest integral value. If the fractional component of  is 0.499... or less, the number is rounded down (5.1 becomes 5). If the fractional component is 0.5 or more, the number is rounded up (7.8 becomes 8).