Method TryGetValue
TryGetValue(TKey, out TValue)
Gets the value associated with the specified key.
Declaration
public bool TryGetValue(TKey key, out TValue value)
Parameters
Type | Name | Description |
---|---|---|
TKey | key | The key whose value to get. |
TValue | value | When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the |
Returns
Type | Description |
---|---|
Boolean | true if the object that implements IDictionary<TKey,TValue> contains an element with the specified key; otherwise, false. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|