There are many ways to declare a new class type:

  1. TMyClass1 = TObject;
  2. TMyClass2 = type TObject;
  3. TMyClass3 = class end;
  4. TMyClass4 = class(TObject);
  5. TMyClass5 = class(TObject) end;

It's my understanding that class 3, 4 and 5 are descendants of TObject, but it's not clear how 1 and 2 differ, and what the differences between 3,4 and 5 are.

Are there any differences?

Edit
Report