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

后端 未结 4 670
鱼传尺愫
鱼传尺愫 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:32

    I found the answer to the second part of my questions. Yes, a class can implement an interface that is in a different class as long that the interface is declared as public.

提交回复
热议问题