If I have an If
statement with 2 conditions - and the first fails, will the 2nd condition even be considered or will it go straight to the else
? So, in the following example, if myList.Count == 0
, will myString
be compared against "value" or will it just straight to else
?
if(myList.Count > 0 && myString.Equals("value"))
{
//Do something
}
else
{
//Do something else
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…