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.
Пространство имён: Tessa.DashboardsСборка: Tessa (в Tessa.dll) Версия: 4.1.3+7e2b1422f9b8c7c41fbbc4b151a843bed05319ab
public static TValue GetOrAddValue<TKey, TValue>(
IDictionary<TKey, TValue> dictionary,
TKey key
)
where TValue : new()
Public Shared Function GetOrAddValue(Of TKey, TValue As New) (
dictionary As IDictionary(Of TKey, TValue),
key As TKey
) As TValue
public:
generic<typename TKey, typename TValue>
where TValue : gcnew()
static TValue GetOrAddValue(
IDictionary<TKey, TValue>^ dictionary,
TKey key
)
static member GetOrAddValue :
dictionary : IDictionary<'TKey, 'TValue> *
key : 'TKey -> 'TValue when '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.
TValueThe value associated with the specified key.