System.TObject.ClassParent
From RAD Studio VCL Reference
Contents |
Delphi Information
From System.pas
class function ClassParent(): TClass;
Unit: System
Type: method
Visibility: public
Member Of: TObject
C++ Information
From System.hpp
__classmethod System::TMetaClass * __fastcall ClassParent(void);
Unit: System
Type: method
Visibility: public
Member Of: TObject
Description
Returns the type of the immediate ancestor of a class.
ClassParent returns the name of the parent class for an object instance or class reference. For TObject, ClassParent returns nil (Delphi) or NULL (C++).
Avoid using ClassParent in application code.
Note: In Delphi code, use the is or as operators instead of ClassParent.
Note: In C++ code, use a dynamic cast or the InheritsFrom method instead of ClassParent.
See Also
Code Samples