IStringMap.Add

Syntax

Add(Key: String; Value: String);

Parameters

Key. Unique character key of the element.

Value. Element value.

Description

The Add method adds elements into the map of character strings.

Example

Sub UserProc;
Var
    StrMap: IStringMap;
    i: Integer;
Begin
    StrMap := New StringMap.Create;
    For i := 0 To Math.RandBetweenI(50100Do
        StrMap.Add("Key_" + Math.RandBetweenI(0100).ToString, "Value " + Math.RandBetweenI(0100).ToString);
    End For;
End Sub UserProc;

After executing the example a string map of random size is generated, elements with repeated keys are overwritten.

See also:

IStringMap