C# 0 The Complete Reference


X  is ever created. However, since  Xhandler( )



Download 4,07 Mb.
Pdf ko'rish
bet538/1096
Sana23.01.2022
Hajmi4,07 Mb.
#402171
1   ...   534   535   536   537   538   539   540   541   ...   1096
Bog'liq
C-Sharp 3 The Complete Reference Herbert Schildt

X

 is ever created. However, since 



Xhandler( )

 is 


a

static

 method of 



X

, it can be attached to 



SomeEvent

 and executed when 



OnSomeEvent( )

is called.



Using Event Accessors

The form of 



event

 used in the preceding examples created events that automatically manage 

the event handler invocation list, including the adding and subtracting of event handlers 

to and from the list. Thus, you did not need to implement any of the list management 

functionality yourself. Because they manage the details for you, these types of events are 

by far the most commonly used. It is possible, however, to provide the event handler list 

operations yourself, perhaps to implement some type of specialized event storage mechanism.

To take control of the event handler list, you will use an expanded form of the 



event

statement, which allows the use of 



event accessors.

 The accessors give you control over how 

the event handler list is implemented. This form is shown here:

www.freepdf-books.com




Download 4,07 Mb.

Do'stlaringiz bilan baham:
1   ...   534   535   536   537   538   539   540   541   ...   1096




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish