IMap<TKey,TValue>.Extract Method

Definition

Removes the element associated with the specified key if it matches the specified value without triggering lifetime management for objects.

Delphi
function Extract(const key: TKey; const value: TValue): TPair<TKey,TValue>

Parameters

key
TKey

The key of the element to remove.

value
TValue

The value of the element to remove.

Returns

TPair<TKey, TValue>

The removed key/value pair for the specified key if it existed; otherwise, Default(TPair<TKey,TValue>) .