C# 0 The Complete Reference


PART I C h a p t e r   1 7



Download 4,07 Mb.
Pdf ko'rish
bet583/1096
Sana23.01.2022
Hajmi4,07 Mb.
#402171
1   ...   579   580   581   582   583   584   585   586   ...   1096
Bog'liq
C-Sharp 3 The Complete Reference Herbert Schildt


PART I

C h a p t e r   1 7 :  

R u n t i m e   T y p e   I D ,   R e f l e c t i o n ,   a n d   A t t r i b u t e s  

465


PART IPART I

Using Reflection

Using


Type

’s methods and properties, it is possible to obtain detailed information about a 

type at runtime. This is an extremely powerful feature, because once you have obtained 

information about a type, you can invoke its constructors, call its methods, and use its 

properties. Thus, reflection enables you to use code that was not available at compile time.

The Reflection API is quite large, and it is not possible to cover the entire topic here. 

(Complete coverage of reflection could easily fill an entire book!) However, because the 

Reflection API is logically designed, once you understand how to use a part of it, the rest 

just falls into place. With this thought in mind, the following sections demonstrate four key 

reflection techniques: obtaining information about methods, invoking methods, constructing 

objects, and loading types from assemblies.


Download 4,07 Mb.

Do'stlaringiz bilan baham:
1   ...   579   580   581   582   583   584   585   586   ...   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