Inheritance design using Interface + abstract class. Good practice?

后端 未结 5 1660
时光说笑
时光说笑 2021-02-05 18:06

I\'m not really sure how to title this question but basically I have an interface like this:

public interface IFoo
{
    string ToCMD();
}

a co

5条回答
  •  灰色年华
    2021-02-05 18:15

    You could also just use interfaces. There is no reason to use an abstract class.

    public interface Foo : IFoo
    {
    }
    
     public interface  Bar : IFoo
    {
    }
    

提交回复
热议问题