10

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 are viewing a single comment's thread
view the rest of the comments
[-] manitcor@lemmy.intai.tech 4 points 3 years ago

Means it will be skipped entirely

[-] jim_stark@programming.dev 3 points 3 years ago

I see, thank you! I got confused with "control falls through a switch statement" and "C++ style fall through in switch statements".

[-] manitcor@lemmy.intai.tech 1 points 3 years ago

C# will let you forget simple things and crash or compile error further down the line.

[-] lmaydev@vlemmy.net 2 points 3 years ago

Unlike c++? Hehe

this post was submitted on 04 Jul 2023
10 points (85.7% liked)

.NET

1869 readers
1 users here now

Getting started

Useful resources

IDEs and code editors

Tools

Rules

Related communities

Wikipedia pages

founded 3 years ago
MODERATORS