Click or drag to resize

PersistentDictionaryTKey, TValueAdd Method (TKey, TValue)

Adds a specified key/value pair to the dictionary. If a value with the specified key already exists, it is replaced. This method does not modify the dictionary on which it is called but instead returns a new dictionary containing the added element.

Namespace:  AGI.Foundation.Infrastructure.Threading
Assembly:  AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 20.3.405.0 (20.3.405.0)
Syntax
public PersistentDictionary<TKey, TValue> Add(
	TKey key,
	TValue value
)

Parameters

key
Type: TKey
The key of the item to add to the dictionary.
value
Type: TValue
The value of the item to add to the dictionary.

Return Value

Type: PersistentDictionaryTKey, TValue
A new persistent dictionary containing the specified key/value pair.
See Also