首页 > 应用开发 > > C#取余问题
写了一个分页小功能,但是计算出来的总页数有问题
listDepts.Count是184
int pageCount = listDepts.Count % 10 == 0 ? listDepts.Count % 10 : (listDepts.Count % 10) + 1;
pageCount为啥等于5
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/1409/viewspace-3153310/ ,如需转载,请注明出处,否则将追究法律责任。
注册时间:2019-04-15