How to I round a decimal upwards to the nearest int.
i.e.
1.2 --开发者_开发问答-> 2
5.6 ---> 6
79.9 ---> 80
85.01 ---> 86
(int)Math.Round(count / (decimal)rows, MidpointRounding.AwayFromZero)
Math.Ceiling
is your friend
How to I round a decimal upwards to the nearest int.
i.e.
1.2 --开发者_开发问答-> 2
5.6 ---> 6
79.9 ---> 80
85.01 ---> 86
(int)Math.Round(count / (decimal)rows, MidpointRounding.AwayFromZero)
Math.Ceiling
is your friend
上一篇:《代鹤》第四句是什么?
精彩评论