Why Block-bodied switch expression arms still isn't there? #6487
Unanswered
ziaulhasanhamim
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
#3037 proposes the idea of adding support for the block-bodied arm for switch expression. I also don't understand why I can't have multiple statements in a switch expression arm. It wasn't convincing for many people from the first. I think that's why this proposal got into action.
This proposal was a C# 9 candidate. After that, it was removed and added to the version 10 candidate. And it was removed again. C# 11 will be released very soon, but there is nothing about it.
I'm not aware if there is any problem with that. Or it's just a normal delay. But eagerly waiting for that because switch statements aren't convenient to write with nasty cases, colon and break, also you can't return something directly from switch statements as it's not an expression.
Beta Was this translation helpful? Give feedback.
All reactions