ReSharper
 
Get ReSharper
Get your hands on the new features ahead of the release by joining the Early Access Program for ReSharper 2025.1! Learn more

Code inspection: Redundant nullable directive

Last modified: 27 May 2024

This inspection reports #nullable directives that do not change the current nullable-aware context. For example, it will report #nullable enable annotation as redundant if the nullability is enabled in the project file via the <Nullable>enable</Nullable> property, or if there is another #nullable enable annotation that precedes it in the same file.