What is short circuit logical evaluation?

Answer Posted / amitabh dubey

Consider This
int x = 8;

if((x == 8) || (y == 12))

Since first expression (x == 8) evaluates to true and it is
seperated by || (or operator) by second expression in the
if statment, c# compiler will short-circuit the evaluation,
and the second statement will never be evaluated.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are cshtml files?

491


Does the system.exception class have any cool features?

511


What is the benefit of interface in c#?

477


What is literal control

586


Tell us something about static linking and dynamic linking?

534






Why do we need escape characters?

487


Is c# a technology?

493


Is null == null c#?

480


What is the difference between firstordefault and first?

480


What is sqlcommandbuilder c#?

455


How many digits is a 32 bit number?

479


Is list immutable in c#?

491


What does xpath return?

541


What is wpf c#?

496


Define parsing? Explain how to parse a datetime string?

510