deepsourcestatus / test-repository

null check is redundant when used in combination with is CS-R1043
Anti-pattern
Major
8 months ago8 months old
Redundant null check
 82        // CS-R1043: `null` check is redundant when used in combination with `is`.
 83        // The condition can be simply written as `f is Foo`.
 84        // https://deepsource.io/directory/analyzers/csharp/issues/CS-R1043.
 85        if (f != null && f is Foo) 86        {
 87
 88        }