Method GetOrAdd
GetOrAdd<TKey, TValue>(IDictionary<TKey, TValue>, TKey, Func<TKey, TValue>)
Declaration
public static TValue GetOrAdd<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key, Func<TKey, TValue> valueFactory)
Parameters
Type | Name | Description |
---|---|---|
IDictionary<TKey, TValue> | dictionary | |
TKey | key | |
Func<TKey, TValue> | valueFactory |
Returns
Type | Description |
---|---|
TValue |
Type Parameters
Name | Description |
---|---|
TKey | |
TValue |