Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use T? on unconstrained type parameters when migrating to C# 9 #1036

Closed
kevinchalet opened this issue Jul 28, 2020 · 1 comment · Fixed by #1078
Closed

Use T? on unconstrained type parameters when migrating to C# 9 #1036

kevinchalet opened this issue Jul 28, 2020 · 1 comment · Fixed by #1078

Comments

@kevinchalet
Copy link
Member

Roslyn now supports the ? annotation on unconstrainted type parameters: dotnet/roslyn#45993

Both the EF 6 and EF Core stores use the [MaybeNull]/[AllowNull] attributes and will have to be updated to use the ? syntax once we move to a SDK/Roslyn bundle that supports C# 9.

@kevinchalet
Copy link
Member Author

Note: support for this feature was added in VS 16.8.0 Preview 2.0 and requires using <LangVersion>preview</LangVersion>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant