The compiler can't validate all calls to your public APIs, even if your code is compiled with nullable annotation contexts enabled. Furthermore, your libraries may be consumed by projects that have not yet opted into using nullable reference types. Validate inputs to public APIs even though you've declared them as nonnullable types.
Best Answer
No, a nullable is a struct. What is happening is that the nullable struct has two values:
int
forint?
,DateTime
forDateTime?
, etc.).HasValue
is the property.)When you set the value of the data type, the struct changes
HasValue
to true.Nullable types (C# Programming Guide)