"Nullable Directives"

#nullable enable
// Nullable references enabled here

#nullable disable
// Nullable references disabled here

#nullable restore
// Resets status to project settings (i.e. disabled unless <Nullable>enable</Nullable> is specified in csproj, in which case enabled)

// See also https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/preprocessor-directives/preprocessor-nullable


Code snippet taken from "Two Decades of C#: A Reference - C# 8".