System.TObject.MethodName

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

class function MethodName(Address: Pointer): string;

C++

__classmethod UnicodeString __fastcall MethodName(void * Address);

Properties

Type Visibility Source Unit Parent
function public
System.pas
systobj.h
System TObject

Description

Returns the name of a class method by address.

There are situations when it is useful to invoke an object method without hard coding the method name in advance. Call MethodAddress to dynamically retrieve the address of such a method by specifying the method name as a string.

MethodName is the opposite of this process--by supplying an Address method, the name of the method is returned as a string.