System.Classes.TList.Exchange

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure Exchange(Index1, Index2: Integer);

C++

void __fastcall Exchange(int Index1, int Index2);

Properties

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

Description

Swaps the position of two items in the Items array.

Call Exchange to swap the positions of the items at positions Index1 and Index1 of the Items array. The indexes are zero-based, so the first item in the list has an index value of 0, the second item has an index value of 1, and so on.

See Also