System.TObject.ClassType

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function ClassType: TClass; inline;

C++

TClass __fastcall ClassType();

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 Delphi 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