How to get the list of possible null reference exceptions from a class file

HI,

 

I am using re sharper, When I find code issues, I am not getting the possible null ref exception suggestion for the following case.

 

obj.name

 

Where name is a string property and can cause null ref exception.

 

 

0
1 comment
Hi,

Some more context is needed about your case. Do you use Null Reference Types in your solution? 
If NRT is used then obj should be declared as nullable type (object?).
If NRT is not used the please enable ReSharper pessimistic analysis via ReSharper | Options | Code Inspection | Settings | Value analysis mode.
Thank you.
0

Please sign in to leave a comment.