System.Generics.Collections.TList

From RAD Studio API Documentation
Jump to: navigation, search

System.Generics.Collections.TEnumerableSystem.TObjectTList

Delphi

TList<T> = class(TEnumerable<T>)

C++

template<typename T> class PASCALIMPLEMENTATION TList__1 : public TEnumerable__1<T>

Properties

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

Description

Ordered list.

TList represents an ordered list, accessible by an index.

You can create a list with a specific collection of items and a comparison operator.

You can add, change, insert or remove an item from a list, or clear the entire list. You can add nil objects to the list.

You can sort, search and reverse a list.

Count contains the number of items in the queue. Capacity is the number of items the list can hold before being resized. You can also set and get values by indexing the Items array.

An OnNotify event tells you when the list has changed.

The class TObjectList inherits from TList and provides an automatic mechanism for freeing objects removed from lists.

See Also

Code Examples