Skip to content

Update the nullable presentation for locals/parameters in the IDE. #69807

Answered by HaloFour
LWChris asked this question in General
Discussion options

You must be logged in to vote

This will no longer produce a warning in C# 9.0 as the language team has decided to always treat var as nullable and to rely on flow analysis to determine when to warn. Assigning null will no longer warn, but trying to deference after that assignment will.

Example

Replies: 78 comments 83 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by sharwell
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
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
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
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
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
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
28 replies
@SRNissen
Comment options

@HaloFour
Comment options

@SRNissen
Comment options

@svick
Comment options

@LWChris
Comment options

Comment options

You must be logged in to vote
7 replies
@HaloFour
Comment options

@SRNissen
Comment options

@CyrusNajmabadi
Comment options

@HaloFour
Comment options

@CyrusNajmabadi
Comment options

Comment options

You must be logged in to vote
43 replies
@Liander
Comment options

@CyrusNajmabadi
Comment options

@Liander
Comment options

@CyrusNajmabadi
Comment options

@CyrusNajmabadi
Comment options

Comment options

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

@LWChris
Comment options

@DavidArno
Comment options

@sharwell
Comment options

@sharwell
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet