Intermediate
C#
Q45 / 100
What are nullable reference types in C# 8+?
Correct! Well done.
Incorrect.
The correct answer is B) A compiler feature that treats reference types as non-nullable by default, requiring ? to opt into null
B
Correct Answer
A compiler feature that treats reference types as non-nullable by default, requiring ? to opt into null
Explanation
Enabling <Nullable>enable</Nullable> makes string non-nullable. string? allows null. The compiler warns on potential NullReferenceExceptions.
Progress
45/100