if ( condition1 // Note: Test for success, not for fail && condition2 // Will be short-circuited if condition1 fails && condition3 // Will be short-circuited if condition1 or condition 2 fails ... && conditionn ) { PerformActionOnAllSuccesses(); DoNormalCleanUp(); } // if else DoFailedCleanUp();
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)