What is short circuit logical evaluation?



What is short circuit logical evaluation?..

Answer / 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

More C Sharp Interview Questions

What is system console writeline in c#?

1 Answers  


how to cleanup object that does not support dispose method? How to implement dispose for such scenarios?

2 Answers   ITC Infotech,


What is covariance and contravariance? Did Delegate and method overriding support these?

1 Answers   TCS,


Can an interface inherit class/abstract class.

1 Answers   Synechron,


What are some of the commonly used commands in sqlcommand?

1 Answers  


How to find whether the application is run from inside ide or not?

1 Answers  


What is the difference between an application domain and a process?

1 Answers  


What is protected internal modifier in C#?

1 Answers   Arigo Infotech,


What are the different types of assembly?

1 Answers  


What’s thread.sleep() in threading ?

1 Answers  


What is a reference type c#?

1 Answers  


What is xml serializer?

1 Answers  


Categories