扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
public class ListBoxEx : ListBox {…} |
public class ListBoxExItem {…} |
public class ListBoxExItemCollection : IList, ICollection, IEnumerator {} //这个类相对于标准ListBox中的ObjectCollection,这个类作为ListBoxEx中的Items属性的类型 public class SelectedListBoxExItemCollection : : IList, ICollection, IEnumerator{} //这个类相对于标准ListBox中的SelectedObjectCollection,这个类作为ListBoxEx中的SelectedItems属性的类型 |
public void Remove(ListBoxExItem item) { this._Items.Remove(item); //_Items为ObjectCollection类型 } public void Insert(int index, ListBoxExItem item) { this._Items.Insert(index, item); } public int Add(ListBoxExItem item) { return this._Items.Add(item); } |
private ObjectCollection _Items; public ListBoxExItemCollection(ObjectCollection baseItems) { this._Items = baseItems; } |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。