System.Generics.Collections.TList.Exchange

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure Exchange(Index1, Index2: Integer); inline;

C++

void __fastcall Exchange(int Index1, int Index2);

Properties

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

Description

Swaps the position of two items in the list.

Call Exchange to swap the position of two items within the list. The positions of the items are indicated by the Index1 and Index2 parameters. 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