Method GetOrCreateCached
GetOrCreateCached(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 GetOrCreateCached(TKey key, Func<TValue> func)
Parameters
key
TKeyThe key of the value to get.
func
Func<TValue>Value provider function.
Returns
- TValue
Remarks
This function uses value of the LastItem property to speed up its work.