Resharper建议改变以下内容:
Type foo = typeof( Foo );
Type bar = typeof( Bar );
if( foo.Equals( bar ) ) { ... }
Run Code Online (Sandbox Code Playgroud)
至:
if( foo == bar ) { ... }
Run Code Online (Sandbox Code Playgroud)
operator ==
// Summary:
// Indicates whether two System.Type objects are equal.
//
// Parameters:
// left:
// The first object to compare.
//
// right:
// The second object to compare.
//
// Returns:
// true if left is equal to right; otherwise, false.
public static bool operator ==( …Run Code Online (Sandbox Code Playgroud)