Method GetOrCreate
GetOrCreate(TKey, Func<TValue>)
Gets the value associated with the specified key.
If the key
is not found in the dictionary,
it is added there with the value provided by func
.
public TValue GetOrCreate(TKey key, Func<TValue> func)
Parameters
key
TKeyThe key of the value to get.
func
Func<TValue>Value provider function.
Returns
- TValue