ImmutableDictionary Class
Provides a set of initialization methods for instances of the ImmutableDictionary<TKey, TValue> class.
NuGet package: System.Collections.Immutable (about immutable collections and how to install)
Assembly: System.Collections.Immutable (in System.Collections.Immutable.dll)
| Name | Description | |
|---|---|---|
![]() ![]() | Contains<TKey, TValue>(IImmutableDictionary<TKey, TValue>^, TKey, TValue) | Determines whether the specified immutable dictionary contains the specified key/value pair. |
![]() ![]() | Create<TKey, TValue>() | Creates an empty immutable dictionary. |
![]() ![]() | Create<TKey, TValue>(IEqualityComparer<TKey>^) | Creates an empty immutable dictionary that uses the specified key comparer. |
![]() ![]() | Create<TKey, TValue>(IEqualityComparer<TKey>^, IEqualityComparer<TValue>^) | Creates an empty immutable dictionary that uses the specified key and value comparers. |
![]() ![]() | CreateBuilder<TKey, TValue>() | Creates a new immutable dictionary builder. |
![]() ![]() | CreateBuilder<TKey, TValue>(IEqualityComparer<TKey>^) | Creates a new immutable dictionary builder. |
![]() ![]() | CreateBuilder<TKey, TValue>(IEqualityComparer<TKey>^, IEqualityComparer<TValue>^) | Creates a new immutable dictionary builder. |
![]() ![]() | CreateRange<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>>^) | Creates a new immutable dictionary that contains the specified items. |
![]() ![]() | CreateRange<TKey, TValue>(IEqualityComparer<TKey>^, IEnumerable<KeyValuePair<TKey, TValue>>^) | Creates a new immutable dictionary that contains the specified items and uses the specified key comparer. |
![]() ![]() | CreateRange<TKey, TValue>(IEqualityComparer<TKey>^, IEqualityComparer<TValue>^, IEnumerable<KeyValuePair<TKey, TValue>>^) | Creates a new immutable dictionary that contains the specified items and uses the specified key comparer. |
![]() ![]() | GetValueOrDefault<TKey, TValue>(IImmutableDictionary<TKey, TValue>^, TKey) | Gets the value for a given key if a matching key exists in the dictionary. |
![]() ![]() | GetValueOrDefault<TKey, TValue>(IImmutableDictionary<TKey, TValue>^, TKey, TValue) | Gets the value for a given key if a matching key exists in the dictionary. |
![]() ![]() | ToImmutableDictionary<TSource, TKey>(IEnumerable<TSource>^, Func<TSource, TKey>^) | Constructs an immutable dictionary from an existing collection of elements, applying a transformation function to the source keys. |
![]() ![]() | ToImmutableDictionary<TSource, TKey>(IEnumerable<TSource>^, Func<TSource, TKey>^, IEqualityComparer<TKey>^) | Constructs an immutable dictionary based on some transformation of a sequence. |
![]() ![]() | ToImmutableDictionary<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>>^) | Enumerates a sequence of key/value pairs and produces an immutable dictionary of its contents. |
![]() ![]() | ToImmutableDictionary<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>>^, IEqualityComparer<TKey>^) | Enumerates a sequence of key/value pairs and produces an immutable dictionary of its contents by using the specified key comparer. |
![]() ![]() | ToImmutableDictionary<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>>^, IEqualityComparer<TKey>^, IEqualityComparer<TValue>^) | Enumerates a sequence of key/value pairs and produces an immutable dictionary of its contents by using the specified key and value comparers. |
![]() ![]() | ToImmutableDictionary<TSource, TKey, TValue>(IEnumerable<TSource>^, Func<TSource, TKey>^, Func<TSource, TValue>^) | Enumerates and transforms a sequence, and produces an immutable dictionary of its contents. |
![]() ![]() | ToImmutableDictionary<TSource, TKey, TValue>(IEnumerable<TSource>^, Func<TSource, TKey>^, Func<TSource, TValue>^, IEqualityComparer<TKey>^) | Enumerates and transforms a sequence, and produces an immutable dictionary of its contents by using the specified key comparer. |
![]() ![]() | ToImmutableDictionary<TSource, TKey, TValue>(IEnumerable<TSource>^, Func<TSource, TKey>^, Func<TSource, TValue>^, IEqualityComparer<TKey>^, IEqualityComparer<TValue>^) | Enumerates and transforms a sequence, and produces an immutable dictionary of its contents by using the specified key and value comparers. |
This type is thread safe.

