I have an interface like this:
public interface IFoo { int A {get;} int B {get;} }
and I have multiple classes implementing IFoo. I
No, you can neither overload an operator on an interface, nor ensure that any implementors do so (as operator overloading is static in C# ).
Your best option is what you've done, to make IFoo inherit from IEquatable and use Equals(IFoo)
IFoo
IEquatable
Equals(IFoo)