IMap<TKey,TValue>.TryAdd Method
Definition
Attempts to add an element with the specified key and value to the collection.
Delphi
function TryAdd(const key: TKey; const value: TValue): Boolean
Parameters
- key
- TKey
The key of the element to add.
- value
- TValue
The value of the element to add.
Returns
Boolean
True if the key/value pair was added to the map; otherwise, False .