Skip to content

Question about generic nullable, CA1508, CS8602 #4399

Answered by 333fred
Cyl18 asked this question in Q&A
Discussion options

You must be logged in to vote

And I can't pass null to the constructor:

You can if T is actually resolved to a real type. You can also pass default at the location you showed.

As to the CA warning, that looks like a bug. Please file an issue on dotnet/roslyn-analyzers.

Replies: 2 comments 2 replies

Comment options

@Cyl18
Comment options

Comment options

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

Answer selected by Cyl18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants