ImmutableDictionary<TKey, TValue>::IDictionary<TKey, TValue>::Add Method (TKey, TValue)
Adds an element with the provided key and value to the immutable dictionary.
Assembly: System.Collections.Immutable (in System.Collections.Immutable.dll)
| Exception | Condition |
|---|---|
| ArgumentNullException | key is null. |
| ArgumentException | An element with the same key already exists in the dictionary. |
| NotSupportedException | The dictionary is read-only. |
This member is an explicit interface member implementation. It can be used only when the ImmutableDictionary<TKey, TValue> instance is cast to an IDictionary<TKey, TValue> interface.
Show: