Код: Выделить всё
elseСейчас я настроил это следующим образом:
Код: Выделить всё
bool check = true;
if (check1) {
DoSomething1();
check = false;
}
if (check2) {
DoSomething2();
check = false;
}
if (check3) {
DoSomething3();
check = false;
}
if (check4) {
DoSomething4();
check = false;
}
//... several more checks
//If all ifs above failed, check will still be true
if (check)
DoDefault();
Подробнее здесь: https://stackoverflow.com/questions/798 ... statements
Мобильная версия