ThreadSafeDictionaryTKey, TValueAddOrUpdate(TKey, TValue, TValue) Method
Namespace: KGySoft.CollectionsAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
public TValue AddOrUpdate(
TKey key,
TValue addValue,
TValue updateValue
)
Public Function AddOrUpdate (
key As TKey,
addValue As TValue,
updateValue As TValue
) As TValue
public:
TValue AddOrUpdate(
TKey key,
TValue addValue,
TValue updateValue
)
member AddOrUpdate :
key : 'TKey *
addValue : 'TValue *
updateValue : 'TValue -> 'TValue
- key TKey
- The key to be added or whose value should be updated.
- addValue TValue
- The value to be added for an absent key.
- updateValue TValue
- The value to be set for an existing key.
TValueThe new value for the
key. This will be either
addValue (if the key was absent)
or
updateValue (if the key was present).