One thing you may not know is that Math.Round, by default, rounds to the nearest EVEN number for the least significant digit ("bankers' rounding"), not simply up to the next integer value of the LSD ("symmetric arithmetic rounding", the method you learned in grade school). So, a value of 7.005 will round to 7 (7.00), NOT 7.01 like Mrs. Krabappel taught you. The reasons why are on the math.round page of MSDN: http://msdn.microsoft.com/en-us/library/system.math.round.aspx
To change this, make sure you add a third parameter, MidpointRounding.AwayFromZero
, to your round. This will use the rounding method you're familiar with:
return Math.Round((decimal)context.SourceValue,2, MidpointRounding.AwayFromZero).ToString();
Additionally, to make sure two decimal places are always shown even when one or both are zero, specify a number format in the ToString function. "F" or "f" are good; they'll return the number in a "fixed-point" format which in US cultures defaults to 2 (you can override the default by specifying the number of decimals):
return Math.Round((decimal)context.SourceValue,2, MidpointRounding.AwayFromZero).ToString("F2");