Warning on == used on references (Visual Studio or ReSharper)
问题 According to the documentation of the == operator in MSDN, For reference types other than string, == returns true if its two operands refer to the same object. But, to be honest, I never check if two references are the same with == . I prefer using ReferenceEquals(obj1, obj2) and so do the default override of the Equals function. Therefore, in my projects, when the == operator is used on other types than string, equals to a bug. Is there a way to trigger a warning/error through Visual Studio