num = Math.Round(num, 0, MidpointRounding.AwayFromZero); //四舍五入
注:2重载的Round()在小数位 = 0.5 的时候不会进位,比如 4.5 转换后为 4
MidpointRounding.AwayFromZero必须加上才能真正实现四舍五入
num = Math.Round(num, 0, MidpointRounding.AwayFromZero); //四舍五入
注:2重载的Round()在小数位 = 0.5 的时候不会进位,比如 4.5 转换后为 4
MidpointRounding.AwayFromZero必须加上才能真正实现四舍五入