Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
クラスを定義するこれら 2 つの方法の違いは何ですか?
TMyClass = class end; TMyObject = class(TObject) end;
明らかに、一方は a から派生しTObject、もう一方は独自のクラスです。しかし、この 2 つを使用する際の根本的な違いは何でしょうか?
TObject
違いはありません。ドキュメントからの引用:
(ancestorClass) を省略した場合、新しいクラスは定義済みの System.TObject クラスから直接継承されます。