Possible NullReferenceException and Value Analysis Assert Settings

I've added my custom assertion to the settings, but I'm still getting a spurious possible null reference warning. What am I doing wrong? (Screenshots attached.)



Attachment(s):
Resharper2.PNG
Resharper1.png
2 comments
Comment actions Permalink

Hi Ian,

The settings for your Assert method is not valid. This method don't check
firts argument on null value.
The Assert method terminates if the first argument is false. The right setting
for your method: 0 agrument - == true.

I've added my custom assertion to the settings, but I'm still getting
a spurious possible null reference warning. What am I doing wrong?
(Screenshots attached.)

Best regards,
Alexander Nesterenko
www.safedevelop.com


0
Comment actions Permalink

That did it. I thought I'd tried that, but apparently not! Thanks very much.

0

Please sign in to leave a comment.