I have a problem that I have two types, and the difference is just in a signiture of a method. My 'Plan-B' is that forget this difference and I handle it in the concrete implementation, but for 'Plan-A' I want the following:
public interface MyInterface
{
int property;
void MyMethod();
ICollection<int> MyMethod();
}
public interface A : MyInterface
{
void MyMethod();
}
public class AClass : A
{
public void MyMethod() { ... }
}
public interface B : MyInterface
{
ICollection<int> MyMethod();
}
public class BClass : B
{
public ICollection<int> MyMethod() { ... }
}
So I want that AClass has to be implement methods from A, and do not have to implement ICollection MyMethod from MyInterface.
I hope I wrote it clear.
Is it possible?
Thank you!
AandBextendMyInterfacethen?AandBstand on their own.