Hi,
If you have sub class version method too, then need to elaborate the design by adding one interface which will hold all of your such methods, like below. This design can apply to any of your sub class by just implementing this interface.
public
class MyAbstractChild : MyAbstract,ICommon{
public void CallMyAbstractMethod(){
//Subclass version will be called
ICommon obj = new MyAbstractChild();
obj.MyAbstractMethod();
//Main abstract class version will be called
MyAbstract obj1 = new MyAbstractChild();
obj1.MyAbstractMethod();
}
public new void MyAbstractMethod()
{
Console.WriteLine("I am abstract child");
}
}
public abstract class MyAbstract : ICommon
{
public void MyAbstractMethod(){
Console.WriteLine("I am abstract");}
}
public interface ICommon{
void MyAbstractMethod();}
