question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Nullable Reference Types

See original GitHub issue

Are there any plans to add annotations for Nullable Reference Types? As in

<Nullable>enable</Nullable>

It’s probably quite some work, but as all the new project templates come with it enabled by default, I think that’s one of the last features to have to be fully “.NET 6 compliant”.

I’ve briefly enabled it and I was swamped with errors and warnings of course. But I guess we can do it slowly, one project at a time (or even one file at a time by using the #nullable enable directive on top) and see where we get?

I’m willing to try and help with this, but I wanted to be sure there’s interest first 😉

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
RHaughtoncommented, Nov 26, 2021

+1 for FastEndpoints

1reaction
fretjecommented, Nov 26, 2021

Ok, I’ll see what I can do…

Concerning the Minimal API’s: it’s already partly there: you’re already using the new hosting model and only program.cs with top level statements.

I think we should eventually look into converting to endpoints as well though, just not with all endpoints defined in program.cs which is now being done in almost every sample. There are existing libraries for organising that already. There’s Ardalis.ApiEndpoints. There’s also FastEndpoints and I think Carter also does that. And all of them promise much better performance than controllers, but with the same ease of organization.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nullable reference types
Nullable reference types refers to a group of features enabled in a nullable aware context that minimize the likelihood that your code causes ......
Read more >
Nullable reference types - C# reference
Nullable reference types aren't new class types, but rather annotations on existing reference types. The compiler uses those annotations to help ...
Read more >
Digging Into Nullable Reference Types in C#
Enabling Nullable Reference Types · PropertyGroup · OutputType · OutputType · TargetFramework · TargetFramework · ImplicitUsings · ImplicitUsings ...
Read more >
Nullable Reference types in C# – Best practices
Using nullable reference types in C# ... int ? nullable = null ;. The int? notation is a shorthand for the Nullable<int> generic...
Read more >
What are nullable reference types in C# 8.0?
As the name suggests, nullable reference types may be null . When variables may be null , the compiler enforces specific rules to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found