C# 0 The Complete Reference


a & b  is a  ThreeD



Download 4,07 Mb.
Pdf ko'rish
bet314/1096
Sana23.01.2022
Hajmi4,07 Mb.
#402171
1   ...   310   311   312   313   314   315   316   317   ...   1096
Bog'liq
C-Sharp 3 The Complete Reference Herbert Schildt

a & b

 is a 


ThreeD

 object, which in this case is a true object. Since the 

operators

true

 and 


false

 are defined, this resulting object is subjected to the 



true

 operator, 

and a 

bool

 result is returned. In this case, the result is 



true

 and the 



if

 succeeds.

Because the necessary rules have been followed, the short-circuit operators are now 

available for use on 



ThreeD

 objects. They work like this. The first operand is tested by using 



operator true

(for


 ||

) or 


operator false

 (for 


&&

). If it can determine the outcome of the 

operation, then the corresponding 

&

 or 


|

 is not evaluated. Otherwise, the corresponding 

overloaded

&

 or 


|

 is used to determine the result. Thus, using a 



&&

 or 


||

 causes the 

corresponding 

&

 or 


|

 to be invoked only when the first operand cannot determine the 

outcome of the expression. For example, consider this statement from the program:

www.freepdf-books.com




Download 4,07 Mb.

Do'stlaringiz bilan baham:
1   ...   310   311   312   313   314   315   316   317   ...   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