ImmutableDictionary<TKey, TValue>
public sealed class ImmutableDictionary<TKey, TValue> : IImmutableDictionary<TKey, TValue>, IReadOnlyDictionary<TKey, TValue>, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable, IReadOnlyCollection<KeyValuePair<TKey, TValue>>, IImmutableDictionaryInternal<TKey, TValue>, IHashKeyCollection<TKey>, IDictionary<TKey, TValue>, ICollection<KeyValuePair<TKey, TValue>>, IDictionary, ICollection
Represents an immutable, unordered collection of keys and values.
NuGet package: System.Collections.Immutable (about immutable collections and how to install)
public sealed class Builder<TKey, TValue> : IDictionary<TKey, TValue>, ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable, IReadOnlyDictionary<TKey, TValue>, IReadOnlyCollection<KeyValuePair<TKey, TValue>>, IDictionary, ICollection
Represents a hash map that mutates with little or no memory allocations and that can produce or build on immutable hash map instances very efficiently.
NuGet package: System.Collections.Immutable (about immutable collections and how to install)
public struct Enumerator<TKey, TValue> : IEnumerator<KeyValuePair<TKey, TValue>>, IEnumerator, IDisposable
Enumerates the contents of the immutable dictionary without allocating any memory.
NuGet package: System.Collections.Immutable (about immutable collections and how to install)
Gets an empty immutable dictionary.
Gets the number of key/value pairs in the immutable dictionary.
Gets a value that indicates whether this instance of the immutable dictionary is empty.
Gets the TValue associated with the specified key.
Gets the key comparer for the immutable dictionary.
Gets the keys in the immutable dictionary.
Gets the value comparer used to determine whether values are equal.
Gets the values in the immutable dictionary.
Adds an element with the specified key and value to the immutable dictionary.
Adds the specified key/value pairs to the immutable dictionary.
Retrieves an empty immutable dictionary that has the same ordering and key/value comparison rules as this dictionary instance.
Determines whether this immutable dictionary contains the specified key/value pair.
Determines whether the immutable dictionary contains an element with the specified key.
Determines whether the immutable dictionary contains an element with the specified value.
Returns an enumerator that iterates through the immutable dictionary.
Removes the element with the specified key from the immutable dictionary.
Removes the elements with the specified keys from the immutable dictionary.
Sets the specified key and value in the immutable dictionary, possibly overwriting an existing value for the key.
Sets the specified key/value pairs in the immutable dictionary, possibly overwriting existing values for the keys.
Creates an immutable dictionary with the same contents as this dictionary that can be efficiently mutated across multiple operations by using standard mutable interfaces.
Determines whether this dictionary contains a specified key.
Gets the value associated with the specified key.
public ImmutableDictionary<TKey, TValue> WithComparers(IEqualityComparer<TKey> keyComparer, IEqualityComparer<TValue> valueComparer)
Gets an instance of the immutable dictionary that uses the specified key and value comparers.
Gets an instance of the immutable dictionary that uses the specified key comparer.