Populating Boolean variables


Link to this posting

If it's possible, populate Boolean variables with results of Boolean expressions instead of direct assigning of true and false.

*** BAD code: ***

Code: Select all
if (rowCount > 1)
   multiRowsMode = true;
else
   multiRowsMode = false;

*** GOOD code: ***

Code: Select all
multiRowsMode = (rowCount > 1);