Adds the specified key and value to the dictionary.

Namespace: System.Collections.ObjectModel
Assembly: Elysium (in Elysium.dll) Version: 2.0.976.4 (2.0.976.4)

Syntax

C#
public void Add(
	TKey key,
	TValue value
)
Visual Basic
Public Sub Add ( 
	key As TKey,
	value As TValue
)

Parameters

key
Type: TKey
The key of the element to add.
value
Type: TValue
The value of the element to add. The value can be null for reference types.

Implements

IObservableDictionary<(Of <(<'TKey, TValue>)>)>..::..Add(TKey, TValue)
IDictionary<(Of <(<'TKey, TValue>)>)>..::..Add(TKey, TValue)

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionkey is null.
System..::..ArgumentExceptionAn element with the same key already exists in the Dictionary<(Of <(<'TKey, TValue>)>)>.

See Also