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. Values of the key and element are passed by the Key and Value parameters.

Example

Sub Main;

Var

StrMap: IStringMap;

i: Integer;

Begin

StrMap:=New StringMap.Create;

For i:=0 To Math.RandBetweenI(50,100) Do

StrMap.Add("Key_"+Math.RandBetweenI(0,100).ToString ,"Value "+Math.RandBetweenI(0,100).ToString);

End For;

End Sub Main;

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

See also:

IStringMap