111,126
社区成员
发帖
与我相关
我的任务
分享
public class SortabledArrayList : ArrayList, IBindingList, IComparer
{
//IComparer比较方法简单就不写代码了 ,IBindingList接口有疑问方法
public void RemoveIndex(PropertyDescriptor property)
{
throw new Exception("ddd");
}
public void AddIndex(PropertyDescriptor property)
{
throw new Exception("ddd");
}
public object AddNew()
{
if (this.Count > 0)
{
//if (this!=null )
//{
// return ((IBindingList)this).AddNew();
//}
return Activator.CreateInstance(this[0].GetType());
}
else
{
return null;
}
//throw new Exception ("ddd");
}
}