Regarding only the formatting, I prefere:
if(MyFirstExtremlyLongExpressionWhichBarelyFitsIntoALine && MySecondExtremlyLongExpressionWhichBarelyFitsIntoALine && MyThirdExtremlyLongExpressionWhichBarelyFitsIntoALine ) { // ... }
But if the expressions are really long and compley, you should define temporary variables to enhance readability:
bool condition1 = MyFirstExtremlyLongExpressionWhichBarelyFitsIntoALine; bool condition2 = MySecondExtremlyLongExpressionWhichBarelyFitsIntoALine; bool condition3 = MyThirdExtremlyLongExpressionWhichBarelyFitsIntoALine; if(condition1 && condition2 && condition3) { // ... }
The latter also clarifies your intention, if you are doing more complex boolean expressions:
if((!condition1 && !condition2) && condition3) { // ... }