DEV Community

Discussion on: Why switch is better than if-else

Collapse
 
mortoray profile image
edA‑qa mort‑ora‑y

C++ compilers will tell you when you've forgotten a default block. I didn't remember C# needing it, since it can't fall through to the next block.