static bool Equals(AnyMatcher <T> obj1, AnyMatcher <T> obj2) { if (object.Equals(null, obj1) || object.Equals(null, obj2) || obj1.GetType() != obj2.GetType()) { return(false); } // If both are non-null and they have the same type, // they match essentially any value of the same type, // so they are equal. return(true); }
public bool Equals(AnyMatcher <T> other) => other != null;
public bool Equals(AnyMatcher <T> other) => Equals(other);