Skip to content
Discussion options

You must be logged in to vote

You can use ?? throw expression, or you can make the __unwrap extension method.

! is designed for when nullability is obvious to human, but not provable for the compiler. It's intentionally not checking for performance reason, for example the usage in ImmutableArray<T>.

The nullable reference type feature of C# 8 is designed to be pure compile time check, to avoid breaking existing code as possible.

Replies: 10 comments 28 replies

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
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
19 replies
@kjpgit
Comment options

@CyrusNajmabadi
Comment options

@kjpgit
Comment options

@RikkiGibson
Comment options

@kjpgit
Comment options

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
3 replies
@kjpgit
Comment options

@CyrusNajmabadi
Comment options

@sharwell
Comment options

Answer selected by sharwell
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@CyrusNajmabadi
Comment options

@kjpgit
Comment options

@jmarolf
Comment options

@kjpgit
Comment options

@TahirAhmadov
Comment options

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

This discussion was converted from issue #5967 on March 29, 2022 14:51.