ReSharper 2024.1 Help

Code Inspection: Possible 'System.NullReferenceException'

Category

Potential Code Quality Issues

ID

PossibleNullReferenceException

EditorConfig

resharper_possible_null_reference_exception_highlighting

Default severity

Warning

Language

C#

Requires SWA

No

ReSharper analyzes nullability of symbols and issues a warning if it detects access to members on objects that can be null references.

Note that nullability analysis is configurable, meaning that you can define in which situations ReSharper will assume values to be null references.

You can find detailed explanations of how ReSharper detects possible 'null' dereferences in the Value and nullability analysis and the Detect possible NullReferenceExceptions topics.

Last modified: 15 April 2024