[Overview][Types][Classes][Procedures and functions][Index] | Reference for unit 'ExtCtrls' (#lcl)

# TBevel.Assign

Copies property values from Source to the current class instance.

## Declaration

Source position: extctrls.pp line 684

`public procedure TBevel.Assign(`
`Source: TPersistent`
`); override;`

## Description

Assign copies the contents of Source to Self, if the classes of the destination and source classes are compatible.

The TPersistent implementation of Assign does nothing but call the AssignTo method for the source. This means that if the destination class does not know how to assign the contents of the source class, the source class instance is asked to assign itself to the destination class. This means that it is necessary to implement only one of the two methods so that two classes can be assigned to one another.

Remark:

In general, a statement of the form:

    Destination:=Source;

(where Destination and Source are classes) does not achieve the same as a statement of the form.

    Destination.Assign(Source);

After the former statement, both Source and Destination will point to the same object. The latter statement will copy the contents of the Source class to the Destination class.

## See also

TPersistent