如何将小数向上舍入到最接近的整数。
即
1.2 ---> 2
5.6 ---> 6
79.9 ---> 80
85.01 ---> 86
(int)Math.Round(count/(decimal)rows, MidpointRounding.AwayFromZero)
最佳答案
Math.Ceiling
是你的 friend
关于c# - 使用 C# 舍入到上面的单位,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2274885/