IDictionary.Item

Syntax

Item(Key: Variant): Variant;

Parameters

Key. Element key.

Description

The Item property determines value of the glossary element with the specified key.

Example

Sub UserProc;
Var
    Hast: IHashtable;
    i: Integer;
    v: Variant;
Begin
    Hast := New Hashtable.Create;
    For i := 0 To 100 Do
        Hast.Add(i, Math.RandBetween(0100));
    End For;
    v := Hast.Item(10);
End Sub UserProc;

After executing the example a hash table is created, and the "v" variable contains value of the element with the 10 key.

See also:

IDictionary