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: 23.2.417.0 (23.2.417.0)
public PersistentDictionary<TKey, TValue> Add(
	TKey key,
	TValue value


Type: TKey
The key of the item to add to the dictionary.
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