bemara57
asked on
Does multiple condition stop at the first 'false'?
Say a condition has multiple checks like this:
if (reader != null && !reader.IsClosed)
Does the condition stop if 'reader' is null, or does it continue to even check reader.IsClosed? If it does it would throw an exception because because it's null. Or is this code safe because the 'if' condition breaks as soon as it finds that read is null?
if (reader != null && !reader.IsClosed)
Does the condition stop if 'reader' is null, or does it continue to even check reader.IsClosed? If it does it would throw an exception because because it's null. Or is this code safe because the 'if' condition breaks as soon as it finds that read is null?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.