Doesn't the next case or close bracket of the switch imply the end of the case anyway? Break should only be required to break early.
If c# switch-case statements can't fall through anyhow, why require a break keyword after each case?
-
-
-
Hoping someone smarter than me knows something I don't about this.
#csharp#programming - Näytä vastaukset
Uusi keskustelu -
-
-
to simulate fall-through you can make it explicit with "goto case X" or "goto default". You can do that instead of break.
-
I don't want to simulate it fall through. Wondering why the break keyword is required absent of other control changes (return, etc)
- Näytä vastaukset
Uusi keskustelu -
Lataaminen näyttää kestävän hetken.
Twitter saattaa olla ruuhkautunut tai ongelma on muuten hetkellinen. Yritä uudelleen tai käy Twitterin tilasivulla saadaksesi lisätietoja.