Skip to content

TCollection.Exchange

Exchange 2 items in the collection.

Declaration

Source position: classesh.inc line 959

public 
procedure TCollection.Exchange(const Index1: Integer; 
                              const index2: Integer);

Description

Exchange exchanges the items at indexes Index1 and Index2 in the collection.

Errors

If one of the two indexes is invalid (less than zero or larger than the number of items) an EListError exception is raised.

See also

Name Description
Items Indexed array of items in the collection.
TCollectionItem.Index Index of the item in its managing collection TCollection.Items property.