System.TObject.ClassType

From RAD Studio VCL Reference
Jump to: navigation, search

Contents

Delphi Information

From System.pas

	function ClassType(): TClass;


Unit: System

Type: method

Visibility: public

Member Of: TObject

C++ Information

From System.hpp

	System::TMetaClass * __fastcall ClassType(void);


Unit: System

Type: method

Visibility: public

Member Of: 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 Samples


Personal tools
Translations
Newest Version