I've been playing with new c# 8.0
NullableReferenceTypes
feature for a while.
And I'm little bit confused about turning this feature on via changing .csproj
file.
I mean in order to enable this feature you have to put the following lines in your .csproj
file:
<PropertyGroup>
<LangVersion>8.0</LangVersion>
<NullableContextOptions>enable</NullableContextOptions>
</PropertyGroup>
But also I've found another one way:
<PropertyGroup>
<LangVersion>8.0</LangVersion>
<NullableReferenceTypes>true</NullableReferenceTypes>
</PropertyGroup>
So it almost the same but anyway. What is the difference between NullableContextOptions
and NullableReferenceTypes
?