IStringMap.Keys

Syntax

Keys: ICollection;

Description

The Keys property returns collection of string map keys.

Example

Sub UserProc;
Var
    StrMap: IStringMap;
    i: Integer;
    Keys: ICollection;
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;
    Keys := StrMap.Keys;
    i := Keys.Count;
End Sub UserProc;

After executing the example a string map is generated, elements with repeated keys are overwritten, and the "i" variable contains the number of keys.

See also:

IStringMap