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 thread.
View all comments View context
3 points

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

permalink
report
parent
reply
1 point

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

permalink
report
parent
reply
2 points

Unlike c++? Hehe

permalink
report
parent
reply

.NET

!dotnet@programming.dev

Create post

Getting started

Useful resources

IDEs and code editors

Tools

Rules

  • Rule 1: Follow Lemmy rules
  • Rule 2: Be excellent to each other, no hostility towards users for any reason
  • Rule 3: No spam of tools/companies/advertisements

Related communities

Wikipedia pages

Community stats

  • 96

    Monthly active users

  • 292

    Posts

  • 291

    Comments