Exceptions for "Possible System.NullReferenceException"

This is not a big issue but when you have a call to System.Security.Principal.WindowsIdentity.GetCurrent() in an if-statement, R# says that GetCurrent() might return a possible System.NullReferenceException.

Is it possible to add exceptions to the "Possible System.NullReferenceException" for methods of which you are sure that will always return a valid object?

1 comment
Comment actions Permalink

Unfortunately, there is no convinient way of modifying our annotations.
The only way is to modify XML files in  'External Annotations' folder under ReSharper installation


Please sign in to leave a comment.