[Overview][Classes][Procedures and functions][Index] Reference for unit 'LazMethodList' (#lazutils)

TMethodList.Items

Provides indexed access to methods in the list.

Declaration

Source position: lazmethodlist.pas line 63

public property TMethodList.Items[Index: Integer] : TMethod
  read GetItems
  write SetItems;
  default;

Description

Items is a TMethod property that provides indexed access to methods in the list by the ordinal position specified in Index. The TMethod instance contains the Data (object reference) and Code (pointer to the method) store in the list items.

Reading a value in the Items property accesses the block of memory stored in an internal member at the position in Index. When Writing a value in the Items property, the value in AllowDuplicates is used to determine if duplicates of the TMethod value are allowed in the list. When AllowDuplicates is False, an EListError exception is raised for the error condition. The IndexOf method is called to determine if the method already exists in Items.

Items is the default property in TMethodList and provides support for enumerators using the GetEnumerator and GetReversedEnumerator methods.

Errors

Raises an EListError exception when a duplicate value is detected in the Items property.

See also

TMethodList.AllowDuplicates

  

Indicates if duplicate methods are allowed in the list.

TMethodList.IndexOf

  

Gets the position where the specified method is stored in the list.

TMethodList.GetEnumerator

  

Gets an enumerator for the list.

TMethodList.GetReversedEnumerator

  

Gets an enumerator for the list that navigates in reverse order.

TMethod

EListError


Version 4.0 Generated 2025-05-03 Home