nested conditions

code refactoring

Flattening Arrow Code

I often encounter code like this: if (rowCount > rowIdx) { if (drc[rowIdx].Table.Columns.Contains("avalId") { do { if (Attributes[attrVal.AttributeClassId] == null) { // do stuff } else { if (!(Attributes[attrVal.AttributeClassId] is ArrayList)) { // do stuff } else { if (!isChecking) { // do stuff } else { // do stuff

By Jeff Atwood ·
Comments