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 of the value to get. |
TValue | value | The value associated with the specified key, otherwise null. |
Returns
Type | Description |
---|---|
bool | true if the dictionary contains a value with the specified key, otherwise false. |