Which statement about the C# switch statement is true?
Correct answer D. Control cannot fall through from one non-empty case section to the next
Explanation
Unlike C, C# forbids implicit fall-through: each non-empty switch section must end with break, return, throw, goto or a similar jump, or the compiler reports an error. Several labels may share one section by stacking them. case labels can be strings, enums, constants or any pattern, and default is optional.
Answer checked How we write and check questions
Discussion