Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Extension method: bool TryGetValue<TKey1, TKey2, TValue>(this IDictionary<TKey1, Dictionary<TKey2, TValue>>, TKey1, TKey2, out TValue)

Declaration

public static bool TryGetValue<TKey1, TKey2, TValue>(
    this IDictionary<TKey1, Dictionary<TKey2, TValue>> source,
    TKey1 key1,
    TKey2 key2,
    out TValue value
)

Summary

Gets the value associated with the specified combination of keys.

Generic type parameters

TKey1 Type of the first-level key.
TKey2 Type of the second-level key.
TValue Type of values in the dictionary.

Parameters

this IDictionary<TKey1, Dictionary<TKey2, TValue>>source Source dictionary to examine.
TKey1key1 The first key to check for.
TKey2key2 The second key to check for.
out TValuevalue When this method returns, the value associated with the specified keys, if the keys are found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.

Returns

true if the two-level dictionary contains an element with the specified combination of keys; otherwise, false.