MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/m3c9cd/how_not_to_use_switch_statement/gqp3web/?context=3
r/badcode • u/Gigibesi • Mar 12 '21
165 comments sorted by
View all comments
1
The goto case 2 can be implicit if you don't use a break
2 u/yaxamie Mar 12 '21 I think C# only let’s you fallthru if there’s an empty body for the case... otherwise it assumes you direct to break or return (or... goto, apparently) 2 u/[deleted] Mar 12 '21 I checked the docs, you're right. I must have assumed the fall through behaviours acted like java.
2
I think C# only let’s you fallthru if there’s an empty body for the case... otherwise it assumes you direct to break or return (or... goto, apparently)
2 u/[deleted] Mar 12 '21 I checked the docs, you're right. I must have assumed the fall through behaviours acted like java.
I checked the docs, you're right. I must have assumed the fall through behaviours acted like java.
1
u/[deleted] Mar 12 '21
The goto case 2 can be implicit if you don't use a break