dotnet/dotnet-api-docs

Add information on Reference Type Nullability during runtime

Opened this issue · 2 comments

In reference to dotnet/runtime#101438

I have been looking for a way to determine the Nullability of "string?" Properties on DTOs during runtime.

But this happens mostly during compile-time and gets converted to "string" with a special compiler "NullableAttribute" instead.

Finding the proper solution was hard, because the Nullable Reference Type docs have no hint or link to the NullabilityInfoContext which can be used for exactly this purpose.

It would be great to add a note of some kind to either the Nullable Reference Type docs above and/or the Nullable Analysis docs.

Because the Nullable Value Type docs also contain a reference to the related Nullable.GetUnderlyingType() docs.

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@dotnet/area-system-reflection