JetBrains Rider 2026.1 Help

Code inspection: Check for reference equality instead

This inspection reports negated static Equals(type1, type2) calls used to compare System.Type values.

When you want to check that two Type objects are different, != is the idiomatic form and avoids the extra negation around Equals(...).

Example

using System; bool AreDifferent(Type left, Type right) { return !Equals(left, right); }
using System; bool AreDifferent(Type left, Type right) { return left != right; }

Quick-fix

A quick-fix helps you replace !Equals(left, right) with left != right.

27 March 2026