Sign in Join
FPDoc Onlineexperiment

SameMethod function

In unit LazMethodList

Determines whether the specified method instances contain the same code and data.

Declaration

pascal
function SameMethod(const m1: TMethod; const m2: TMethod): Boolean

Description

SameMethod is a Boolean function which returns True when m1 and m2 contain the same code and data in the TMethod instances. The comparison examines the Code and Data members in the TMethod records. The return value is True when the Code and Data members are identical in both records.

SameMethod replaces the deprecated CompareMethods routine in LCL version 2.3.

Used in the implementation of the IndexOf method in TMethodList, and when reading the value for the Current property in TItemsEnumerator.

See also

An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.