In C#, can a class inherit from another class and an interface?

后端 未结 4 664
鱼传尺愫
鱼传尺愫 2020-12-04 07:28

I want to know if a class can inherit from a class and an interface. The example code below doesn\'t work but I think it conveys what I want to do. The reason that I want t

4条回答
  •  北海茫月
    2020-12-04 08:10

    No, not exactly. But it can inherit from a class and implement one or more interfaces.

    Clear terminology is important when discussing concepts like this. One of the things that you'll see mark out Jon Skeet's writing, for example, both here and in print, is that he is always precise in the way he decribes things.

提交回复
热议问题