Skip to content

Overload_CodeJam_Collections_DictionaryExtensions_AddOrUpdate

Andrew Koryavchenko edited this page Jul 4, 2017 · 4 revisions

DictionaryExtensions.AddOrUpdate Method

Overload List

 

Name Description
Public methodStatic member AddOrUpdate(TKey, TValue)(ConcurrentDictionary(TKey, TValue), TKey, Func(TKey, TValue)) Adds a key/value pair to the ConcurrentDictionary(TKey, TValue) if the key does not already exist, or updates a key/value pair ConcurrentDictionary(TKey, TValue) by using the specified function if the key already exists.
Public methodStatic member AddOrUpdate(TKey, TValue)(IDictionary(TKey, TValue), TKey, Func(TKey, TValue)) Adds a key/value pair to the IDictionary(TKey, TValue) if the key does not already exist, or updates a key/value pair IDictionary(TKey, TValue) by using the specified function if the key already exists.
Public methodStatic member AddOrUpdate(TKey, TValue)(IDictionary(TKey, TValue), TKey, Func(TKey, TValue), Func(TKey, TValue, TValue)) Adds a key/value pair to the IDictionary(TKey, TValue) if the key does not already exist, or updates a key/value pair IDictionary(TKey, TValue) by using the specified function if the key already exists.
Public methodStatic member AddOrUpdate(TKey, TValue)(IDictionary(TKey, TValue), TKey, TValue, Func(TKey, TValue, TValue)) Adds a key/value pair to the IDictionary(TKey, TValue) if the key does not already exist, or updates a key/value pair IDictionary(TKey, TValue) by using the specified function if the key already exists.
  Back to Top

See Also

Reference

DictionaryExtensions Class
CodeJam.Collections Namespace

Clone this wiki locally