0

What is the difference between these two ways of defining a class?

TMyClass = class

end;

TMyObject = class(TObject)

end;

Obviously one derives from a TObject and the other is a class of its own. But what is the fundamental difference between using the two?

4

1 回答 1

15

There is no difference. Quote from the documentation:

If you omit (ancestorClass), then the new class inherits directly from the predefined System.TObject class.

于 2013-05-26T19:15:14.463 回答