C# 0 The Complete Reference


typeof  statement to obtain a  Type



Download 4,07 Mb.
Pdf ko'rish
bet596/1096
Sana23.01.2022
Hajmi4,07 Mb.
#402171
1   ...   592   593   594   595   596   597   598   599   ...   1096
Bog'liq
C-Sharp 3 The Complete Reference Herbert Schildt

typeof

 statement to obtain a 



Type

object upon which all of the reflection methods either directly or indirectly operated. 

Although this might be useful in a number of circumstances, the full power of reflection 

is found when the types available to a program are determined dynamically by analyzing 

the contents of other assemblies.

As you know from Chapter 16, an assembly carries with it type information about the 

classes, structures, and so on, that it contains. The Reflection API allows you to load an 

assembly, discover information about it, and create instances of any of its publicly available 

types. Using this mechanism, a program can search its environment, utilizing functionality 

that might be available without having to explicitly define that functionality at compile 

time. This is an extremely potent, and exciting, concept. For example, you can imagine a 

program that acts as a “type browser,” displaying the types available on a system. Another 

application could be a design tool that lets you visually “wire together” a program that is 

composed of the various types supported by the system. Since all information about a type 

is discoverable, there is no inherent limitation to the ways reflection can be applied.

To obtain information about an assembly, you will first create an 




Download 4,07 Mb.

Do'stlaringiz bilan baham:
1   ...   592   593   594   595   596   597   598   599   ...   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