PageOffsetList的名称空间? [英] namespace for PageOffsetList?

查看:56
本文介绍了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;


我不知道任何此类名称PageOffsetList的名称,因此我对其进行了Google搜索.我什么都没找到.

可以想像,这肯定是某个人编写的自定义类(肯定不是您,因为您不知道它.).查看链接,从中复制了您现在正在引用的代码的源.

在班级后面的代码中添加此代码:
I didn''t knew of any such class name PageOffsetList, so I Googled it. I didn''t find anything as such.

As thought, it was surely a custom class written by someone (surely not you as you are not aware of it.). Looking at the links, found the source from where it looks like the code was copied which you are referring now.

Add this in your code behind class:
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的名称空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆