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: 24.2.419.0 (24.2.419.0)
Syntax public PersistentDictionary<TKey, TValue> Add(
TKey key,
TValue value
)
Public Function Add (
key As TKey,
value As TValue
) As PersistentDictionary(Of TKey, TValue)
public:
PersistentDictionary<TKey, TValue>^ Add(
TKey key,
TValue value
)
member Add :
key : 'TKey *
value : 'TValue -> PersistentDictionary<'TKey, 'TValue>
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,
TValueA new persistent dictionary containing the specified key/value pair.
See Also