Show/Hide Toolbars

RiverSoftAVG Products Help

Navigation: Code Documentation > RSCommon > RSGenerics.Collections > Classes > TRSDictionary<TKey,TValue> > Methods

TRSDictionary<TKey,TValue>.Add(TKey,TValue) Method

Scroll Prev Top Next More

Add key-value pair.

Add adds a key and its corresponding value to the dictionary. Both the key and the value can be nil.

If the key already exists in the dictionary, an exception is thrown.

An    OnKeyNotify event and an    OnValueNotify event occur indicating that an entry was added to the dictionary.

The    Items property lists all dictionary entries. You can also set and get values by indexing directly the Items property. For instance, you can set a value this way:

Delphi

Items[key] := value;

 
Setting the value this way overwrites the value for an existing key, but does not raise an exception.
 

Namespace: RSGenerics.Collections

Parameters

Key

Type: TKey

Value

Type: TValue

RiverSoftAVG Products Help © 1996-2016 Thomas G. Grubb