Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

Specialized Collections 

Specialized collections are collections with highly specific purposes. NameValueCollection is based on NameObjectCollectionBase; however, NameValueCollection accepts multiple values per key, whereas NameObjectCollectionBase accepts only one value per key.

Some strongly typed collections in the System.Collections.Specialized namespace are StringCollection and StringDictionary, both of which contain values that are exclusively strings.

The CollectionsUtil class creates instances of case-insensitive collections.

Some collections transform. For example, the HybridDictionary class starts as a ListDictionary and becomes a Hashtable when it becomes large. The KeyedCollection is a list but it also creates a lookup dictionary when the number of elements reaches a specified threshold.

See Also

Community Additions

© 2015 Microsoft