The .NET Framework provides some specialized collections that are optimized to work on a specific type of data, or in a specific way. These non-generic collection classes are defined inside the System.Collections.Specialized namespace. They are synopsized in the following table:
Specialized Collection | Description |
---|---|
CollectionsUtil | A collection that ignores case differences in strings. |
HybridDictionary | A collection that uses a ListDictionary to store key/value pairs when there are few elements in the collection. When the collection grows beyond a certain size, a Hashtable is automatically used to store the elements. |
ListDictionary | A collection that stores key/value pairs in a linked list. It is recommended only for small collections. |
NameValueCollection | A sorted collection of key/value pairs in which both the key and value are of type string. |
OrderedDictionary | A collection of key/value pairs that can be indexed. (Added by C# 2.0.) |
StringCollection | A collection optimized for storing strings. |
StringDictionary | A hash table of key/value pairs in which both the key and the value are of type string. |