DictionaryExtensionsTryAdd Method

Overload List

TryAddTKey, TValue(IDictionaryTKey, TValue, KeyValuePairTKey, TValue) Tries to add a pair of key and value the specified dictionary. The operation is thread safe if dictionary is a ThreadSafeDictionaryTKey, TValue, ConcurrentDictionaryTKey, TValue or LockingDictionaryTKey, TValue instance. For other IDictionaryTKey, TValue implementations the caller should care about thread safety if needed.
TryAddTKey, TValue(IDictionaryTKey, TValue, TKey, TValue) Tries to add a pair of key and value the specified dictionary. The operation is thread safe if dictionary is a ThreadSafeDictionaryTKey, TValue, ConcurrentDictionaryTKey, TValue or LockingDictionaryTKey, TValue instance. For other IDictionaryTKey, TValue implementations the caller should care about thread safety if needed.

See Also