System.TObject.ClassName

From RAD Studio VCL Reference
Jump to: navigation, search

Contents

Delphi Information

From System.pas

	class function ClassName(): string;


Unit: System

Type: method

Visibility: public

Member Of: TObject

C++ Information

From System.hpp

	__classmethod System::UnicodeString __fastcall ClassName(void);


Unit: System

Type: method

Visibility: public

Member Of: TObject

Description

Returns a string indicating the type of the object instance (as opposed to the type of the variable passed as an argument).


Use ClassName to obtain the class name from an object instance or class reference. This is useful for differentiating object instances that are assigned to a variable that has the type of an ancestor class.

Note:  In C++ code, call ClassName as a method to obtain an object's class name. Use the global static function to obtain the class name from a metaclass object.

See Also

Code Samples


Personal tools
Translations
Newest Version