True or False: If a match expression doesn't match any case pattern and there's no default case, control falls through a switch statement.
True or False: If a match expression doesn't match any case pattern and there's no default case, control falls through a switch statement.
The `if` and `switch` statements provide branching logic in C#. You use `if, `else` and `switch` to choose the path your program follows.
What does "control falls through a switch statement" mean in this context? Control just moves on to the next statement?
I thought if there is no match and a default case doesn't exist it will raise an exception. Is it not true?
You're viewing a single thread.
Means it will be skipped entirely
4 0 ReplyI see, thank you! I got confused with "control falls through a switch statement" and "C++ style fall through in switch statements".
3 0 ReplyC# will let you forget simple things and crash or compile error further down the line.
1 0 ReplyUnlike c++? Hehe
2 0 Reply