Is there a built-in method for it? The .NET framework must have a method to do this!
private decimal RoundDownTo2DecimalPlaces(decimal input)
{
if (input < 0)
{
throw new Exception("not tested with negative numbers");
}
// There must be a better way!
return Math.Truncate(input * 100) / 100;
}
There isn’t any built-in method in the .NET framework to do this. Other answers say how to write your own code.