When I write this:
ReferenceEquals(x, null)
Visual studio suggests that the
null check can be simplified.
They mean the same in this case, yes. Most would use x == null though.
I guess ReferenceEquals could be little bit confusing because actually null is a literal that means no reference at all. How can any reference be equal to no reference?
Note that x is null is only allowed with C#7 and it's pattern matching feature. Normally you use is to check if x is a compatible type but null is not a type. So this is a bit confusing as well.
That's why i prefer x == null