System.Collections.Specialized Namespace

 

The System.Collections.Specialized namespace contains specialized and strongly-typed collections; for example, a linked list dictionary, a bit vector, and collections that contain only strings.

ClassDescription
System_CAPS_pubclassCollectionChangedEventManager

Provides a WeakEventManager implementation so that you can use the "weak event listener" pattern to attach listeners for the CollectionChanged event.

System_CAPS_pubclassCollectionsUtil

Creates collections that ignore the case in strings.

System_CAPS_pubclassHybridDictionary

Implements IDictionary by using a ListDictionary while the collection is small, and then switching to a Hashtable when the collection gets large.

System_CAPS_pubclassNameObjectCollectionBase.KeysCollection

Represents a collection of the String keys of a collection.

System_CAPS_pubclassListDictionary

Implements IDictionary using a singly linked list. Recommended for collections that typically include fewer than 10 items.

System_CAPS_pubclassNameObjectCollectionBase

Provides the abstract base class for a collection of associated String keys and Object values that can be accessed either with the key or with the index.

System_CAPS_pubclassNameValueCollection

Represents a collection of associated String keys and String values that can be accessed either with the key or with the index.

System_CAPS_pubclassNotifyCollectionChangedEventArgs

Provides data for the CollectionChanged event.

System_CAPS_pubclassOrderedDictionary

Represents a collection of key/value pairs that are accessible by the key or index.

System_CAPS_pubclassStringCollection

Represents a collection of strings.

System_CAPS_pubclassStringDictionary

Implements a hash table with the key and the value strongly typed to be strings rather than objects.

System_CAPS_pubclassStringEnumerator

Supports a simple iteration over a StringCollection.

StructureDescription
System_CAPS_pubstructureBitVector32

Provides a simple structure that stores Boolean values and small integers in 32 bits of memory.

System_CAPS_pubstructureBitVector32.Section

Represents a section of the vector that can contain an integer number.

InterfaceDescription
System_CAPS_pubinterfaceINotifyCollectionChanged

Notifies listeners of dynamic changes, such as when an item is added and removed or the whole list is cleared.

System_CAPS_pubinterfaceIOrderedDictionary

Represents an indexed collection of key/value pairs.

DelegateDescription
System_CAPS_pubdelegateNotifyCollectionChangedEventHandler

Represents the method that handles the CollectionChanged event.

EnumerationDescription
System_CAPS_pubenumNotifyCollectionChangedAction

Describes the action that caused a CollectionChanged event.

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<TKey, TItem> is a list but it also creates a lookup dictionary when the number of elements reaches a specified threshold.

Return to top
Show: