Q:

Does c# support chaining && in an if statement or do they have to be nested?

If I use the following code, 
if (obj.ContactDetail != null && obj.ContactDetail.Id != Guid.Empty)

Will I get a null reference error on the second half (.Id) or will it behave like javascript and fall out of the If on the first half of the comparison.
I KNOW this has been answered, but i don't know the terms to use to look it up. Sry.

A:

That's called short-circuit evaluation and yes, && is an operator that only evaluates the second condition if the first was not already  false.
MSDN:

The conditional-AND operator (&&) performs a logical-AND of its bool
  operands, but only evaluates its second operand if necessary.
The operation x && y corresponds to the operation x & y except that if
  x is false, y is not evaluated, because the result of the AND
  operation is false no matter what the value of y is. This is known as
  "short-circuit" evaluation. The conditional-AND operator cannot be
  overloaded, but overloads of the regular logical operators and
  operators true and false are, with certain restrictions, also
  considered overloads of the conditional logical operators.

