一点关于System.Collection的总结:
Class | Type | Usage |
HashTable | Key/value | 用于Weak type object的Collection。 |
System.Collections.Generic. Dictionary<TKey,TValue> | Key/value | 用于strong type object的collection。 |
List | index | |
SortedList | index, key | |
SortedList<TKey,TValue> | index, key | * SortedList uses less memory than SortedDictionary. If the list is populated all at once from sorted data, SortedList is faster than SortedDictionary. |
SortedDictionary<TKey,TValue> | index, key | SortedDictionary has faster insertion and removal operations for unsorted data: O(log n) as opposed to O(n) for SortedList. |