This print for content only-size & color not accurate 7" X 9-1/4" / casebound / malloy



Download 21,46 Mb.
Pdf ko'rish
bet1051/1830
Sana28.09.2021
Hajmi21,46 Mb.
#188411
1   ...   1047   1048   1049   1050   1051   1052   1053   1054   ...   1830
Bog'liq
[book] [en] Pro C# 2008 and the NET 3.5 Platform Fourth Edition



Source Code

The LateBindingApp project is included in the Chapter 16 subdirectory.



Understanding Attributed Programming

As illustrated at beginning of this chapter, one role of a .NET compiler is to generate metadata

descriptions for all defined and referenced types. In addition to this standard metadata contained

within any assembly, the .NET platform provides a way for programmers to embed additional

metadata into an assembly using 

attributes. In a nutshell, attributes are nothing more than code

annotations that can be applied to a given type (class, interface, structure, etc.), member (property,

method, etc.), assembly, or module.

The idea of annotating code using attributes is not new. COM IDL provided numerous prede-

fined attributes that allowed developers to describe the types contained within a given COM server.

However, COM attributes were little more than a set of keywords. If a COM developer needed to

create a custom attribute, he or she could do so, but it was referenced in code by a 128-bit number

(GUID), which was cumbersome at best.

Unlike COM IDL attributes (which again were simply keywords), .NET attributes are class types

that extend the abstract System.Attribute base class. As you explore the .NET namespaces, you will

find many predefined attributes that you are able to make use of in your applications. Furthermore,

you are free to build custom attributes to further qualify the behavior of your types by creating a

new type deriving from Attribute.

Understand that when you apply attributes in your code, the embedded metadata is essentially

useless until another piece of software explicitly reflects over the information. If this is not the case,

the blurb of metadata embedded within the assembly is ignored and completely harmless.

C H A P T E R   1 6  


Download 21,46 Mb.

Do'stlaringiz bilan baham:
1   ...   1047   1048   1049   1050   1051   1052   1053   1054   ...   1830




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