System.Classes.TCollection.Assign

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure Assign(Source: TPersistent); override;

C++

virtual void __fastcall Assign(TPersistent* Source);

Properties

Type Visibility Source Unit Parent
procedure
function
public
System.Classes.pas
System.Classes.hpp
System.Classes TCollection

Description

Copies the contents of the Source collection to the current object.

Use Assign to copy the contents of one TCollection instance to another. The Assign method deletes all items from the destination collection (the object where it is executed), then adds a copy of each item in the source collection's Items array.

Source is another object (typically another collection) that contains the items that replace this collection's items.

See Also

Code Examples