System.Collections namespaces for UWP apps

System.Collections namespaces for UWP apps

 

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 .NET for UWP apps. Note that .NET for UWP 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 .NET for UWP apps.

Types supported in .NET for UWP apps

Description

ArrayList

Implements the IList interface using an array whose size is dynamically increased as required.To browse the .NET Framework source code for this type; see the Reference Source.

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).

CaseInsensitiveComparer

Compares two objects for equivalence; ignoring the case of strings.

CollectionBase

Provides the abstract base class for a strongly typed collection.

Comparer

Compares two objects for equivalence; where string comparisons are case-sensitive.

DictionaryBase

Provides the abstract base class for a strongly typed collection of key/value pairs.

DictionaryEntry

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

Hashtable

Represents a collection of key/value pairs that are organized based on the hash code of the key.To browse the .NET Framework source code for this type; see the Reference Source.

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.

Queue

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

ReadOnlyCollectionBase

Provides the abstract base class for a strongly typed non-generic read-only collection.

SortedList

Represents a collection of key/value pairs that are sorted by the keys and are accessible by key and by index.

Stack

Represents a simple last-in-first-out (LIFO) non-generic collection of objects.

StructuralComparisons

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

Types supported in the .NET for UWP apps

Description

BlockingCollection(Of T)

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

ConcurrentBag(Of T)

Represents a thread-safe, unordered collection of objects.

ConcurrentDictionary(Of TKey, TValue)

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

ConcurrentQueue(Of T)

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

ConcurrentStack(Of 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(Of 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(Of 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(Of TSource)

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

Types supported in the .NET for UWP apps

Description

Comparer(Of T)

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

Dictionary(Of TKey, TValue)

Represents a collection of keys and values.

Dictionary(Of TKey, TValue).Enumerator

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

Dictionary(Of TKey, TValue).KeyCollection

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

Dictionary(Of TKey, TValue).KeyCollection.Enumerator

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

Dictionary(Of TKey, TValue).ValueCollection

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

Dictionary(Of TKey, TValue).ValueCollection.Enumerator

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

EqualityComparer(Of T)

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

HashSet(Of T)

Represents a set of values.

HashSet(Of T).Enumerator

Enumerates the elements of a HashSet<T> object.

ICollection(Of T)

Defines methods to manipulate generic collections.

IComparer(Of T)

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

IDictionary(Of TKey, TValue)

Represents a generic collection of key/value pairs.

IEnumerable(Of T)

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

IEnumerator(Of T)

Supports a simple iteration over a generic collection.

IEqualityComparer(Of T)

Defines methods to support the comparison of objects for equality.

IList(Of T)

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

IReadOnlyCollection(Of T)

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

IReadOnlyDictionary(Of TKey, TValue)

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

IReadOnlyList(Of T)

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

ISet(Of 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(Of TKey, TValue)

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

LinkedList(Of T)

Represents a doubly linked list.

LinkedList(Of T).Enumerator

Enumerates the elements of a LinkedList<T>.

LinkedListNode(Of T)

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

List(Of T)

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

List(Of T).Enumerator

Enumerates the elements of a List<T>.

Queue(Of T)

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

Queue(Of T).Enumerator

Enumerates the elements of a Queue<T>.

SortedDictionary(Of TKey, TValue)

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

SortedDictionary(Of TKey, TValue).Enumerator

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

SortedDictionary(Of TKey, TValue).KeyCollection

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

SortedDictionary(Of TKey, TValue).KeyCollection.Enumerator

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

SortedDictionary(Of TKey, TValue).ValueCollection

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

SortedDictionary(Of TKey, TValue).ValueCollection.Enumerator

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

SortedList(Of TKey, TValue)

Represents a collection of key/value pairs that are sorted by key based on the associated IComparer<T> implementation.

SortedSet(Of T)

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

SortedSet(Of T).Enumerator

Enumerates the elements of a SortedSet<T> object.

Stack(Of T)

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

Stack(Of T).Enumerator

Enumerates the elements of a Stack<T>.

Types supported in the .NET for UWP apps

Description

Collection(Of T)

Provides the base class for a generic collection.

KeyedCollection(Of TKey, TItem)

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

ObservableCollection(Of T)

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

ReadOnlyCollection(Of T)

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

ReadOnlyDictionary(Of TKey, TValue)

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

ReadOnlyDictionary(Of TKey, TValue).KeyCollection

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

ReadOnlyDictionary(Of TKey, TValue).ValueCollection

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

ReadOnlyObservableCollection(Of T)

Represents a read-only ObservableCollection<T>.

Types supported in the .NET for UWP apps

Description

BitVector32

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

BitVector32.Section

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

CollectionsUtil

Creates collections that ignore the case in strings.

HybridDictionary

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

INotifyCollectionChanged

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

IOrderedDictionary

Represents an indexed collection of key/value pairs.

ListDictionary

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

NameObjectCollectionBase

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.

NameObjectCollectionBase.KeysCollection

Represents a collection of the String keys of a collection.

NameValueCollection

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

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.

OrderedDictionary

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

StringCollection

Represents a collection of strings.

StringDictionary

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

StringEnumerator

Supports a simple iteration over a StringCollection.

Show:
© 2017 Microsoft