Table of Contents

Method GetOrCreate

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

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 TKey

The key of the value to get.

func Func<TValue>

Value provider function.

Returns

TValue