Ok, I tried and got the correct result.
Below is the code I used:
funding.amount= Math.Round(decimal.Parse(dr["Amount"].ToString()), 2).ToString();
//, since the number was of type string, so I used the code above. we can also use the code below:
decimal.Round(yourValue, 2, MidpointRounding.AwayFromZero);
http://msdn.microsoft.com/en-us/library/9s0xa85y.aspx
source
share