20110515 学习记录

泛型

命名空间: system.collections.generic; System.Collections.ObjectModel

对应的 集合 system.collections;

 

区别:集合是弱类型,添加元素都要装箱,因此读取的时候需要拆箱,效率低下。

 

接口:

ICollection<T>

IList<T>

IEnumerable<T>

IEnumerator<T>

IDictionary<TKey, TValue>

IComparer<T>

IEqualityComparer<T>

 

类:

List<T>

Dictionary<TKey, TValue>
SortedList<TKey, TValue>,

LinkedList<T>

Queue<T>

Stack<T>

 

System.Collections.ObjectModel 命名空间下;

Collection<T>

ReadOnlyCollection<T>

KeyedCollection<TKey, TItem>

 

委托类似匿名表达式。

posted @ 2011-05-15 09:29  jeekun  阅读(162)  评论(0编辑  收藏  举报