ConcurrentIndexedDictionaryTKey, TValueAdd Method

Adds a key-value pair to the dictionary, and returns the index at which it was added.

Definition

Namespace: SnapDB.Collections
Assembly: SnapDB (in SnapDB.dll) Version: 1.0.102.0 -- Release Build+29075351d0e5aa4dea46a5c520805222f672dc2e
public int Add(
	TKey key,
	TValue value
)

Parameters

key  TKey
The key to add to the dictionary.
value  TValue
The value associated with the key.

Return Value

Int32
The index at which the key-value pair was added in the dictionary.

Exceptions

DuplicateNameExceptionThrown if the specified key already exists in the dictionary.

See Also