Share via


System.Collections namespaces

System.Collections and its child namespaces (System.Collections.Concurrent, System.Collections.Generic, System.Collections.ObjectModel, and System.Collections.Specialized) contain types that define various standard, specialized, and generic collection objects.

This topic displays the types in the System.Collections namespaces that are included in the .NET for Windows Store apps. Note that the .NET for Windows Store apps does not include all the members of each type. For information about individual types, see the linked topics. The documentation for a type indicates which members are included in the .NET for Windows Store apps.

System.Collections namespace

Types supported in the .NET for Windows Store apps

Description

BitArray

Manages a compact array of bit values, which are represented as Booleans, where true indicates that the bit is on (1) and false indicates the bit is off (0).

DictionaryEntry

Defines a dictionary key/value pair that can be set or retrieved.

ICollection

Defines size, enumerators, and synchronization methods for all nongeneric collections.

IComparer

Exposes a method that compares two objects.

IDictionary

Represents a nongeneric collection of key/value pairs.

IDictionaryEnumerator

Enumerates the elements of a nongeneric dictionary.

IEnumerable

Exposes the enumerator, which supports a simple iteration over a non-generic collection.

IEnumerator

Supports a simple iteration over a nongeneric collection.

IEqualityComparer

Defines methods to support the comparison of objects for equality.

IList

Represents a non-generic collection of objects that can be individually accessed by index.

IStructuralComparable

Supports the structural comparison of collection objects.

IStructuralEquatable

Defines methods to support the comparison of objects for structural equality.

StructuralComparisons

Provides objects for performing a structural comparison of two collection objects.

System.Collections.Concurrent namespace

Types supported in the .NET for Windows Store apps

Description

BlockingCollection<T>

Provides blocking and bounding capabilities for thread-safe collections that implement IProducerConsumerCollection<T>.

ConcurrentBag<T>

Represents a thread-safe, unordered collection of objects.

ConcurrentDictionary<TKey, TValue>

Represents a thread-safe collection of key-value pairs that can be accessed by multiple threads concurrently.

ConcurrentQueue<T>

Represents a thread-safe first in-first out (FIFO) collection.

ConcurrentStack<T>

Represents a thread-safe last in-first out (LIFO) collection.

EnumerablePartitionerOptions

Out-of-the-box partitioners are created with a set of default behaviors. For example, by default, some form of buffering and chunking will be employed to achieve optimal performance in the common scenario where an IEnumerable<T> implementation is fast and non-blocking. These behaviors can be overridden using this enumeration.

IProducerConsumerCollection<T>

Defines methods to manipulate thread-safe collections intended for producer/consumer usage. This interface provides a unified representation for producer/consumer collections so that higher level abstractions such as BlockingCollection<T> can use the collection as the underlying storage mechanism.

OrderablePartitioner<TSource>

Represents a particular manner of splitting an orderable data source into multiple partitions.

Partitioner

Provides common partitioning strategies for arrays, lists, and enumerables.

Partitioner<TSource>

Represents a particular manner of splitting a data source into multiple partitions.

System.Collections.Generic namespace

Types supported in the .NET for Windows Store apps

Description

Comparer<T>

Provides a base class for implementations of the IComparer<T> generic interface.

Dictionary<TKey, TValue>

Represents a collection of keys and values.

Dictionary<TKey, TValue>.Enumerator

Enumerates the elements of a Dictionary<TKey, TValue>.

Dictionary<TKey, TValue>.KeyCollection

Represents the collection of keys in a Dictionary<TKey, TValue>. This class cannot be inherited.

Dictionary<TKey, TValue>.KeyCollection.Enumerator

Enumerates the elements of a Dictionary<TKey, TValue>.KeyCollection.

Dictionary<TKey, TValue>.ValueCollection

Represents the collection of values in a Dictionary<TKey, TValue>. This class cannot be inherited.

Dictionary<TKey, TValue>.ValueCollection.Enumerator

Enumerates the elements of a Dictionary<TKey, TValue>.ValueCollection.

EqualityComparer<T>

Provides a base class for implementations of the IEqualityComparer<T> generic interface.

HashSet<T>

Represents a set of values.

HashSet<T>.Enumerator

Enumerates the elements of a HashSet<T> object.

ICollection<T>

Defines methods to manipulate generic collections.

IComparer<T>

Defines a method that a type implements to compare two objects.

IDictionary<TKey, TValue>

Represents a generic collection of key/value pairs.

IEnumerable<T>

Exposes the enumerator, which supports a simple iteration over a collection of a specified type.

IEnumerator<T>

Supports a simple iteration over a generic collection.

IEqualityComparer<T>

Defines methods to support the comparison of objects for equality.

IList<T>

Represents a collection of objects that can be individually accessed by index.

IReadOnlyCollection<T>

Represents a strongly-typed, read-only collection of elements.

IReadOnlyDictionary<TKey, TValue>

Represents a generic read-only collection of key/value pairs.

IReadOnlyList<T>

Represents a read-only collection of elements that can be accessed by index.

ISet<T>

Provides the base interface for the abstraction of sets.

KeyNotFoundException

The exception that is thrown when the key specified for accessing an element in a collection does not match any key in the collection.

KeyValuePair<TKey, TValue>

Defines a key/value pair that can be set or retrieved.

LinkedList<T>

Represents a doubly linked list.

LinkedList<T>.Enumerator

Enumerates the elements of a LinkedList<T>.

LinkedListNode<T>

Represents a node in a LinkedList<T>. This class cannot be inherited.

List<T>

Represents a strongly typed list of objects that can be accessed by index. Provides methods to search, sort, and manipulate lists.

List<T>.Enumerator

Enumerates the elements of a List<T>.

Queue<T>

Represents a first-in, first-out collection of objects.

Queue<T>.Enumerator

Enumerates the elements of a Queue<T>.

SortedDictionary<TKey, TValue>

Represents a collection of key/value pairs that are sorted on the key.

SortedDictionary<TKey, TValue>.Enumerator

Enumerates the elements of a SortedDictionary<TKey, TValue>.

SortedDictionary<TKey, TValue>.KeyCollection

Represents the collection of keys in a SortedDictionary<TKey, TValue>. This class cannot be inherited.

SortedDictionary<TKey, TValue>.KeyCollection.Enumerator

Enumerates the elements of a SortedDictionary<TKey, TValue>.KeyCollection.

SortedDictionary<TKey, TValue>.ValueCollection

Represents the collection of values in a SortedDictionary<TKey, TValue>. This class cannot be inherited

SortedDictionary<TKey, TValue>.ValueCollection.Enumerator

Enumerates the elements of a SortedDictionary<TKey, TValue>.ValueCollection.

SortedSet<T>

Represents a collection of objects that is maintained in sorted order.

SortedSet<T>.Enumerator

Enumerates the elements of a SortedSet<T> object.

Stack<T>

Represents a variable size last-in-first-out (LIFO) collection of instances of the same arbitrary type.

Stack<T>.Enumerator

Enumerates the elements of a Stack<T>.

System.Collections.ObjectModel namespace

Types supported in the .NET for Windows Store apps

Description

Collection<T>

Provides the base class for a generic collection.

KeyedCollection<TKey, TItem>

Provides the abstract base class for a collection whose keys are embedded in the values.

ObservableCollection<T>

Represents a dynamic data collection that provides notifications when items get added, removed, or when the whole list is refreshed.

ReadOnlyCollection<T>

Provides the base class for a generic read-only collection.

ReadOnlyDictionary<TKey, TValue>

Represents a read-only, generic collection of key/value pairs.

ReadOnlyDictionary<TKey, TValue>.KeyCollection

Represents a read-only collection of the keys of a ReadOnlyDictionary<TKey, TValue> object.

ReadOnlyDictionary<TKey, TValue>.ValueCollection

Represents a read-only collection of the values of a ReadOnlyDictionary<TKey, TValue> object.

ReadOnlyObservableCollection<T>

Represents a read-only ObservableCollection<T>.

System.Collections.Specialized namespace

Types supported in the .NET for Windows Store apps

Description

INotifyCollectionChanged

Notifies listeners of dynamic changes, such as when items get added and removed or the whole list is refreshed.

NotifyCollectionChangedAction

Describes the action that caused a CollectionChanged event.

NotifyCollectionChangedEventArgs

Provides data for the CollectionChanged event.

NotifyCollectionChangedEventHandler

Represents the method that handles the CollectionChanged event.

See Also

Concepts

.NET for Windows Store apps APIs