Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Extension method: TValue Get<TKey, TValue>(this IDictionary<TKey, TValue>, TKey, TValue)

Declaration

public static TValue Get<TKey, TValue>(
    this IDictionary<TKey, TValue> dict,
    TKey key,
    TValue defaultVal
)

Summary

Gets a value from a dictionary by key. If the key does not exist in the dictionary, the default value is returned instead.

Generic type parameters

TKeyThis type parameter is not documented.
TValueThis type parameter is not documented.

Parameters

this IDictionary<TKey, TValue>dict Dictionary to operate on.
TKeykey Key to look up.
TValuedefaultVal Value to return if key is not contained in the dictionary.