List.Skip((pagecount-1)*pagesize).Take(pagesize)
假设你每页10条数据
当前是第3页 跳到第4页
则:
List.Skip((4-1)*10).Take(10)
假设你每页10条数据
当前是第3页 跳到第4页
则:
List.Skip((4-1)*10).Take(10)
int numb = 100;
int size = (int)Math.Ceiling((decimal)List.Count / numb);
for (int i = 1; i <= size; i++)
{
var qList = List.Skip((i - 1) * numb).Take(numb).ToList();
}
int size = (int)Math.Ceiling((decimal)List.Count / numb);
for (int i = 1; i <= size; i++)
{
var qList = List.Skip((i - 1) * numb).Take(numb).ToList();
}