Note
If dictionary is neither an IDictionaryTKey, TValue, nor an IReadOnlyDictionaryTKey, TValue instance,
then a sequential lookup is performed using a default equality comparer on the keys.
public static TValue GetValueOrDefault<TKey, TValue>(
this IEnumerable<KeyValuePair<TKey, TValue>> dictionary,
TKey key
)
<ExtensionAttribute>
Public Shared Function GetValueOrDefault(Of TKey, TValue) (
dictionary As IEnumerable(Of KeyValuePair(Of TKey, TValue)),
key As TKey
) As TValue
public:
[ExtensionAttribute]
generic<typename TKey, typename TValue>
static TValue GetValueOrDefault(
IEnumerable<KeyValuePair<TKey, TValue>>^ dictionary,
TKey key
)
[<ExtensionAttribute>]
static member GetValueOrDefault :
dictionary : IEnumerable<KeyValuePair<'TKey, 'TValue>> *
key : 'TKey -> 'TValue