Delphi-Quellcode:
function CompareMethods(const M1, M2): Boolean; // inline;
begin
Result := (TMethod(M1).Code = TMethod(M2).Code)
and (TMethod(M1).Data = TMethod(M2).Data);
end;
// bzw.
function CompareMethods(const M1, M2): Boolean; // inline;
begin
Result := Int64(M1) = Int64(M2);
end;
Geht mit Neuen und mit alten Delphis und bei einigen Versionen sogar als schnuckliger Inlinecode.