IDictionary<TKey,TValue>.TryGetValue Method

Definition

Returns the value associated with a key.

Delphi
function TryGetValue(const Key: TKey; out Value: TValue): Boolean;

Parameters

Key
TKey

The key whose value should be returned.

Value
TValue

When this method returns, contains the value associated with the key if the key is found; otherwise, the default value for TValue.

Returns

Boolean

True if the key is found; otherwise, false.