C# Language Specification


Better conversion from expression



Download 0,75 Mb.
bet198/524
Sana06.01.2022
Hajmi0,75 Mb.
#324842
1   ...   194   195   196   197   198   199   200   201   ...   524
Bog'liq
CSharp Language Specification

Better conversion from expression


Given an implicit conversion C1 that converts from an expression E to a type T1, and an implicit conversion C2 that converts from an expression E to a type T2, C1 is a better conversion than C2 if at least one of the following holds:

  • E has a type S and an identity conversion exists from S to T1 but not from S to T2

  • E is not an anonymous function and T1 is a better conversion target than T2 (§7.5.3.5)

  • E is an anonymous function, T1 is either a delegate type D1 or an expression tree type Expression1>, T2 is either a delegate type D2 or an expression tree type Expression2> and one of the following holds:

  • D1 is a better conversion target than D2

  • D1 and D2 have identical parameter lists, and one of the following holds:

  • D1 has a return type Y1, and D2 has a return type Y2, an inferred return type X exists for E in the context of that parameter list (§7.5.2.12), and the conversion from X to Y1 is better than the conversion from X to Y2

  • E is async, D1 has a return type Task1>, and D2 has a return type Task2>, an inferred return type Task exists for E in the context of that parameter list (§7.5.2.12), and the conversion from X to Y1 is better than the conversion from X to Y2

  • D1 has a return type Y, and D2 is void returning

        1. Download 0,75 Mb.

          Do'stlaringiz bilan baham:
1   ...   194   195   196   197   198   199   200   201   ...   524




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