如何在Linq中使用Skip的long类型(Int64).它仅支持Int32.
dataContext.Persons.Skip(LongNumber);
Run Code Online (Sandbox Code Playgroud)
你可以使用while循环:
// Some init
List<Person> persons = new List<Person>();
List<Person> resultList = persons;
long bigNumber = 3 * (long)int.MaxValue + 12;
while (bigNumber > int.MaxValue)
{
resultList = resultList.Skip(int.MaxValue).ToList();
bigNumber -= int.MaxValue;
}
resultList = resultList.Skip(int.MaxValue).ToList();
// Then what do what you want with this result list
Run Code Online (Sandbox Code Playgroud)
但是你的收藏品不仅仅包括int.MaxValue参赛作品吗?
| 归档时间: |
|
| 查看次数: |
1373 次 |
| 最近记录: |