DashboardHelperGetOrAddValueTKey, TValue - метод

Retrieves a value from a dictionary by its key, or adds the key with a new default value if it does not exist.

Definition

Пространство имён: Tessa.Dashboards
Сборка: Tessa (в Tessa.dll) Версия: 4.1.3+7e2b1422f9b8c7c41fbbc4b151a843bed05319ab
C#
public static TValue GetOrAddValue<TKey, TValue>(
	IDictionary<TKey, TValue> dictionary,
	TKey key
)
where TValue : new()

Параметры

dictionary  IDictionaryTKey, TValue
The dictionary to retrieve or add the value from.
key  TKey
The key to lookup in the dictionary.

Параметры типа

TKey
The type of the dictionary key.
TValue
The type of the dictionary value.

Возвращаемое значение

TValue
The value associated with the specified key.

См. также