if (StateA) { DoSomething(); } else if (StateB) { DoSomething(); DoSomethingElse(); }
Is the same as:
DoSomething(); if (StateB) { DoSomethingElse(); }