Method TryGetValue
TryGetValue(TKey, out TValue)
Returns the value associated with a key.
Declaration
public readonly bool TryGetValue(TKey key, out TValue item)
Parameters
Type | Name | Description |
---|---|---|
TKey | key | The key to look up. |
TValue | item | Outputs the value associated with the key. Outputs default if the key was not present. |
Returns
Type | Description |
---|---|
bool | True if the key was present. |