GetOrAdd<TKey, TValue>(IDictionary<TKey, TValue>, TKey, Func<TValue>) Method

Syntax

public static TValue GetOrAdd<TKey, TValue>(this IDictionary<TKey, TValue> dict, TKey key, Func<TValue> getValue)

Attributes

Type Description
NullableContextAttribute

Type Parameters

Name Description
TKey
TValue

Parameters

Name Type Description
dict IDictionary<TKey, TValue>
key TKey
getValue Func<TValue>

Return Value

Type Description
TValue