Maintainability of Boolean logic - Is nesting if statements needed?
- by Vaccano
Which of these is better for maintainability?
if (byteArrayVariable != null)
if (byteArrayVariable .Length != 0)
//Do something with byteArrayVariable
OR
if ((byteArrayVariable != null) && (byteArrayVariable.Length != 0))
//Do something with byteArrayVariable
I prefer reading and writing the second, but I recall…