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(50,100) Do

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

End For;

Hash1:=Hash.Clone;

Hash.Clear;

End Sub Main;

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

See also:

IHashtable