一:定义Collection类在C#语言中定义一个Collection类最简单的方法就是把System.Collection库中的CollectionBase类作为基础类。二:实现Collection类Collection类中包括了很多方法和属性,这里介绍一下Add方法、Remove方法、Count方法和Clear方法。代码如下 public class collection : CollectionBase { public void Add(object item) { InnerList.Add(item); //添加 } public void Remove(object item) Read More
posted @ 2011-04-07 09:06
helloxyz
Views(12364)
Comments(8)
Diggs(1)

浙公网安备 33010602011771号