Click or drag to resize
DictionaryBaseTKey, TValueAdd Method (TKey, TValue)
Adds a new key-value pair to the dictionary.

Namespace: X3Platform.Collections
Assembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntax
public virtual void Add(
	TKey key,
	TValue value
)

Parameters

key
Type: TKey
Key to add.
value
Type: TValue
Value to associated with the key.

Implements

IDictionaryTKey, TValueAdd(TKey, TValue)
Exceptions
ExceptionCondition
ArgumentExceptionkey is already present in the dictionary
Remarks
The default implementation of this method checks to see if the key already exists using ContainsKey, then calls the indexer setter if the key doesn't already exist.
See Also