【发布时间】:2013-12-03 06:41:00
【问题描述】:
我有一个如下所示的集合:
IList<TQBase> = hq;
public class TQBase
{
public int i { get; set; }
public int q { get; set; }
}
集合中有超过 300 件物品。
现在我需要创建这些集合的集合,这样:
h[0] = the first fifty elements of hq
h[1] = the next fifty elements of hq
...
h[n] = any remaining elements of hq
谁能建议我创建第二个集合的方法。这是不是 我可以使用 Linq 还是有更简单的方法?
【问题讨论】:
-
您要查找的术语是分页算法。
-
已经在这里回答了:stackoverflow.com/a/20036379/552139
-
@fejesjoco:这回答了一个不同的问题(恕我直言)。