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


Private, Protected, and Public Members



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

Private, Protected, and Public Members
A private member is invisible outside of the unit or program where its class is declared. In other words, a private
method cannot be called from another module, and a private field or property cannot be read or written to from
another module. By placing related class declarations in the same module, you can give the classes access to one
another's private members without making those members more widely accessible.
A protected member is visible anywhere in the module where its class is declared and from any descendant class,
regardless of the module where the descendant class appears. A protected method can be called, and a protected
field or property read or written to, from the definition of any method belonging to a class that descends from the one
where the protected member is declared. Members that are intended for use only in the implementation of derived
classes are usually protected.
A public member is visible wherever its class can be referenced.
135



Yüklə 0,84 Mb.

Dostları ilə paylaş:
1   ...   149   150   151   152   153   154   155   156   ...   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