当:decimal sum = 123456.784M;
sum = decimal.Round(sum, 2 , MidpointRounding.AwayFromZero);
sum 的值为:123456.78
当:decimal sum = 123456.785M;
sum = decimal.Round(sum, 2 , MidpointRounding.AwayFromZero);
sum 的值为:123456.79
C#中 decimal 的四舍五入,布布扣,bubuko.com
原文地址:http://www.cnblogs.com/tookoo/p/3792375.html