Delphi Language Guide Delphi for Microsoft Win32 Delphi for the Microsoft. Net framework



Yüklə 0,84 Mb.
Pdf görüntüsü
səhifə150/294
tarix02.01.2022
ölçüsü0,84 Mb.
#41395
1   ...   146   147   148   149   150   151   152   153   ...   294
DelphiLanguageGuide

Inheritance and Scope
When you declare a class, you can specify its immediate ancestor. For example,
type TSomeControl = class(TControl);
declares a class called 
TSomeControl
 that descends from TControl. A class type automatically inherits all of the
members from its immediate ancestor. Each class can declare new members and can redefine inherited ones, but
a class cannot remove members defined in an ancestor. Hence 
TSomeControl
 contains all of the members defined
in TControl and in each of TControl's ancestors.
The scope of a member's identifier starts at the point where the member is declared, continues to the end of the
class declaration, and extends over all descendants of the class and the blocks of all methods defined in the class
and its descendants.
133



Yüklə 0,84 Mb.

Dostları ilə paylaş:
1   ...   146   147   148   149   150   151   152   153   ...   294




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin