Skip to content
Discussion options

You must be logged in to vote

I won't say we can't be convinced to change our minds here, but this was a very explicit decision: https://github.com/dotnet/csharplang/blob/c81b99f4c965dbb6e9819a10a2e010db4c859f6f/meetings/2018/LDM-2018-07-16.md#throw-expression-on-the-right-hand-side. Our reasoning basically agreed with @DavidArno's above, we didn't see the benefits over a simple if statement. You're not trying to assign anything at all, you're doing a null check and throwing.

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by YairHalberstadt
Comment options

You must be logged in to vote
1 reply
@bernd5
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
6 participants
Converted from issue

This discussion was converted from issue #2091 on October 20, 2020 12:04.