System.TObject.ClassType

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

function ClassType: TClass; inline;

C++

TClass __fastcall ClassType(void);

Properties

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

Description

Returns the class reference for the object's class.

Note: ClassType dynamically determines the type of an object and returns its class reference, or metaclass.

Avoid using ClassType in application code.

Note: In Object Pascal code, use the is or as operators instead of ClassType.

Note: In C++ code, use a dynamic cast or the InheritsFrom method instead of ClassType.

See Also

Code Examples