TObject and TClass

The TObject class, declared in the System unit, is the ultimate ancestor of all other classes. TObject defines only a handful of methods, including a basic constructor and destructor. In addition to TObject, the System unit declares the class reference type TClass:

TClass = class of TObject;

If the declaration of a class type doesn't specify an ancestor, the class inherits directly from TObject. Thus type TMyClass = class end;

is equivalent to type TMyClass = class(TObject) end;

The latter form is recommended for readability.

Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook


Post a comment