且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

s-s-rs 中的 Round 函数问题

更新时间:2022-11-28 13:21:53

如果您只需要获得一个整数,请尝试将其强制转换为 int,它应始终四舍五入到最接近的整数,其他使用 Math.Round()

if you just need to get a whole number try casting to int it should always round up to the nearest whole number other use Math.Round()

http://msdn.microsoft.com/en-us/library/aa340227(v=VS.71).aspx