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


■ C #   2 0 0 8   L A N G U A G E   F E AT U R E S 434



Download 21,46 Mb.
Pdf ko'rish
bet858/1830
Sana28.09.2021
Hajmi21,46 Mb.
#188411
1   ...   854   855   856   857   858   859   860   861   ...   1830
Bog'liq
[book] [en] Pro C# 2008 and the NET 3.5 Platform Fourth Edition

C #   2 0 0 8   L A N G U A G E   F E AT U R E S



434

8849CH13.qxd  10/2/07  12:42 PM  Page 434




// takes place here...

}

}



We would now find that the full scope of the CarLocator class is taken into account at compile

time (as shown in the following approximate C# code):

internal class CarLocator

{

public bool CarAvailableInZipCode(string zipCode)



{

this.VerifyDuplicates(zipCode);

return true;

}

private void VerifyDuplicates(string make)



{

}

}



As you can see, when a method is defined with the partial keyword, the compiler will deter-

mine if it should be emitted into the assembly based on whether the method has a method body or

is simply an empty signature. If there is no method body, all traces of the method (invocations,

metadata descriptions, prototypes) are stripped out during the compilation cycle.

In some ways, C# partial methods are a strongly typed version of 

conditional code compilation

(via the #if, #elif, #else, and #endif preprocessor directives; see Chapter 12). The major difference,

however, is that a partial method will be completely ignored during the compilation cycle (regard-

less of build settings) if there is not a supporting implementation.




Download 21,46 Mb.

Do'stlaringiz bilan baham:
1   ...   854   855   856   857   858   859   860   861   ...   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