Is this an acceptable design ??
Abstract class
public abstract class SomethingBase
{
public abstract int Method1(int number1);
public abstract int Method2(int number2);
}
public class Class1 : SomethingBase
{
public override int Method1(int number1)
{
//implementation
}
//i dont want this method in this class
public override int Method2(int number2)
{
throw new NotImplementedException();
}
}
public class Class2 : SomethingBase
{
//i dont want this method in this class
public override int Method1(int number1)
{
throw new NotImplementedException();
}
public override int Method2(int number2)
{
//implementation
}
}
I mean the situation if I need method1 in my Class1 and the method2 not and vica verse for Class2. In fact the methods are excluding each other in the derived classes.