Method Add
Add(TKey, TValue)
Adds an element with the provided key and value to the IDictionary<TKey,TValue>.
Declaration
public void Add(TKey key, TValue value)
Parameters
Type | Name | Description |
---|---|---|
TKey | key | The object to use as the key of the element to add. |
TValue | value | The object to use as the value of the element to add. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
ArgumentException | An element with the same key already exists in the IDictionary<TKey,TValue>. |
NotSupportedException | The IDictionary<TKey,TValue> is read-only. |