ReSharper 2026.1 Help

Code inspection: 'Object.ReferenceEquals' is always false because it is called with value type

This inspection reports object.ReferenceEquals called with a value type argument. That comparison is always false for value types in this context, so it usually indicates the wrong equality check was chosen.

Example

int x = 1; int y = 1; var same = object.ReferenceEquals(x, y);
int x = 1; int y = 1; var same = object.Equals(x, y);

Quick-fix

One quick-fix replaces ReferenceEquals with Equals.

01 April 2026