.Explicit Interface Implementations
Name | Description | |
---|---|---|
ICollection.CopyTo | Copies the elements of the ICollection to an Array, starting at a particular Array index. | |
ICollection<T>.IsReadOnly | Gets a value indicating whether the ICollection<T> is read-only. | |
ICollection.IsSynchronized | Gets a value indicating whether access to the ICollection is synchronized (thread safe). | |
ICollection.SyncRoot | Gets an object that can be used to synchronize access to the ICollection. | |
IEnumerable<T>.GetEnumerator | Returns an enumerator that iterates through a collection. | |
IEnumerable.GetEnumerator | Returns an enumerator that iterates through a collection. | |
IList.Add | Adds an item to the IList. | |
IList.Contains | Determines whether the IList contains a specific value. | |
IList.IndexOf | Determines the index of a specific item in the IList. | |
IList.Insert | Inserts an item to the IList at the specified index. | |
IList.IsFixedSize | Gets a value indicating whether the IList has a fixed size. | |
IList.IsReadOnly | Gets a value indicating whether the IList is read-only. | |
IList.Item | Gets or sets the element at the specified index. | |
IList.Remove | Removes the first occurrence of a specific object from the IList. |
你没发现么?IList继承的只是ICollection 接口,而List<T> 实现的是ICollection<T>接口么?一个是泛型的,一个不是泛型的啊…… ICollection<T>是.Net2.0出现 泛型思想以后 添加的接口。原来的时候只有ICollection,所以List<T>为了 兼容以前的把ICollection<T>接口也实现啦啊
你没发现么?IList继承的只是ICollection 接口,而List<T> 实现的是ICollection<T>接口么?一个是泛型的,一个不是泛型的啊…… ICollection<T>是.Net2.0出现 泛型思想以后 添加的接口。原来的时候只有ICollection,所以List<T>为了 兼容以前的把ICollection<T>接口也实现啦啊