用C#舍入到上面的单位

Kri*_*s-I 1 c# rounding

如何将小数向上舍入到最近的int.

1.2 ---> 2
5.6 ---> 6
79.9 ---> 80
85.01 ---> 86
Run Code Online (Sandbox Code Playgroud)

(int)Math.Round(计数/(十进制)行,MidpointRounding.AwayFromZero)

spe*_*der 12

Math.Ceiling 是你的朋友