System.Generics.Collections.TList.Remove

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function Remove(const Value: T): Integer; inline;

C++

int __fastcall Remove(const T Value);

Properties

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

Description

Remove first occurrence of value.

Remove removes the first instance of Value in the list, returning its zero-based index. If Value is not in the list, this function returns -1.

Since the search is linear, it is an O(n) operation for a list with n entries.

An OnNotify event occurs indicating an entry was removed from the list.

See Also

Code Examples