IHashtable.Clone

Syntax

Clone: IHashtable;

Description

The Clone method creates a copy of hash table.

Example

Sub Main;
Var
    Hash, Hash1: IHashtable;
    i: Integer;
Begin
    Hash := New Hashtable.Create;
    For i := 0 To Math.RandBetweenI(50100Do
        Hash.Add("Key_" + i.ToString, "Value " + Math.RandBetweenI(0100).ToString);
    End For;
    Hash1 := Hash.Clone;
    Hash.Clear;
End Sub Main;

After executing the example the Hash1 variable contains a copy of the Hash hash table.

See also:

IHashtable