本文介绍了PageOffsetList的名称空间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
hi,我应该为PageOffsetList()声明哪种类型的名称?
hi what type of namespce should i declare for PageOffsetList();
bindingSource1.DataSource = new PageOffsetList();
请建议我
谢谢u
please suggest me
thank u
推荐答案
using System.Collections.Generic;
class PageOffsetList : System.ComponentModel.IListSource
{
public bool ContainsListCollection { get; protected set; }
public System.Collections.IList GetList()
{
// Return a list of page offsets based on "totalRecords" and "pageSize"
var pageOffsets = new List<int>();
for (int offset = 0; offset < totalRecords; offset += pageSize)
pageOffsets.Add(offset);
return pageOffsets;
}
}
它已在您的代码库中从这里引用/复制/使用:解决方案2此处 [ ^ ]
It has been referred/copied/used from here in your code base: Solution 2 here[^]
这篇关于PageOffsetList的名称空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!