var firstFiveItems = myList.Take(5);
或切片:
var secondFiveItems = myList.Skip(5).Take(5);
当然,根据某种顺序获得前五个项目通常很方便:
var firstFiveArrivals = myList.OrderBy(i => i.ArrivalTime).Take(5);
欢迎分享,转载请注明来源:内存溢出
var firstFiveItems = myList.Take(5);
或切片:
var secondFiveItems = myList.Skip(5).Take(5);
当然,根据某种顺序获得前五个项目通常很方便:
var firstFiveArrivals = myList.OrderBy(i => i.ArrivalTime).Take(5);
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)