ColectionBase中有List方法,返回的是类本身
class A :CollectionBase
{
public void add(B b)
{
List.Add(b);
}
public void remove(B b)
{
List.Remove(b);
}
public B this[int index]
{
set
{
List[index] = value;
}
get
{
return (B)List[index];
}
}
}
时间: 2024-10-12 16:38:20