内置集合类型整体上分为两大派系,泛型类,非泛型类
1.泛型类
A:接口有 ICollection<T>,IDictionary<T>,IList<T>,ISet<T>
B:具体类有
Map类型:Dictionary<TKey,TValue>,SortedList<TKey,TValue>
List类型:List<T>,LinkedList<T>
Set类型:HashSet<T>,SortedSet<T>
其他:Queue<T>,Stack<T>
2.非泛型类
A:接口有ICollection,IDictionary,IList,没有ISet
B:具体类有
Map类型:HashTable,SortedList
List类型:ArrayList
Set类型:无
其他:Queue,Stack,Array
ps:在使用的过程中,能使用泛型的不要使用非泛型,可以很大程度上,提高代码的效率,但是多线程时,hashtable是线性安全的,dictionary<T1,T2>是非安全的(需要自己实现),可以优先选择hashtable