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


// Now, explicitly state what the parameter type



Download 21,46 Mb.
Pdf ko'rish
bet745/1830
Sana28.09.2021
Hajmi21,46 Mb.
#188411
1   ...   741   742   743   744   745   746   747   748   ...   1830
Bog'liq
[book] [en] Pro C# 2008 and the NET 3.5 Platform Fourth Edition

// Now, explicitly state what the parameter type.

List evenNumbers = list.FindAll((int i) => (i % 2) == 0);

As you have seen, if a lambda expression has a single, implicitly typed parameter, the parenthe-

ses may be omitted from the parameter list. If you wish to be consistent regarding your use of

lambda parameters, you are free to 

always wrap the parameter list within parentheses, leaving us

with this expression:

C H A P T E R   1 1  

D E L E G AT E S, E V E N T S, A N D   L A M B D A S



376

8849CH11.qxd  10/1/07  10:43 AM  Page 376




List evenNumbers = list.FindAll((i) => (i % 2) == 0);

Finally, notice that currently our expression has not been wrapped in parentheses (we have of

course wrapped the modulo statement to ensure it is executed first before the test for equality).

Lambda expressions do allow for the statement to be wrapped as follows:




Download 21,46 Mb.

Do'stlaringiz bilan baham:
1   ...   741   742   743   744   745   746   747   748   ...   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