[Overview][Constants][Types][Classes][Index] | Reference for unit 'fgl' (#rtl)

# TFPGObjectList.Assign

Copy objects from Source list

## Declaration

Source position: fgl.pp line 196

`public procedure TFPGObjectList.Assign(`
`Source: TFPGObjectList`
`);`

## Arguments

`Source` |  | Source list to copy items from.

## Description

Assign clears the list and copies all items in Source to the list. The source list must be of the same type as the destination list.

Take care if both the list owns the objects (i.e. have TFPGObjectList.FreeObjects set to True), this may result to access violations.

## See also

TFPSList.Clear |  | Clear the list
TFPGObjectList.Add |  | Add new object of class T to the list.

Documentation generated on: May 14 2021