IDictionary<TKey,TValue>.TryExtract Method

Definition

Attempts to get and remove the value associated with the specified key, without triggering lifetime management for objects.

Delphi
function TryExtract(const key: TKey; var value: TValue): Boolean

Parameters

key
TKey

The key of the element to extract.

value
TValue

The value associated with the specified key, if the key is found; otherwise, Default(TValue) .

Returns

Boolean

True if the key is found; otherwise, False .