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

TMethodList.IndexOf

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

Declaration

Source position: lazmethodlist.pas line 49

public function TMethodList.IndexOf(

  const AMethod: TMethod

):Integer;

Arguments

AMethod

  

Method to locate in the items for the list.

Function result

Ordinal position for the specified method.

Description

IndexOf is an Integer function used to get the ordinal position in Items where the TMethod instance in AMethod is stored.

IndexOf examines the memory allocated for the Items property. When memory has not been allocated (no methods have been added to the list), the return value is -1. Otherwise, values in the Items property are compared to the TMethod instance in AMethod. The return value is set to the ordinal position in Items where AMethod was located. The return value is in the range 0..Count-1.

See also

TMethodList.Items

  

Provides indexed access to methods in the list.

TMethodList.Count

  

Gets the number of items included in the method list.


Version 4.0 Generated 2025-05-03 Home