Why must the base class be specified before interfaces when declaring a derived class?

后端 未结 7 1757
伪装坚强ぢ
伪装坚强ぢ 2020-12-19 06:54
public interface ITest
{
    int ChildCount { get; set; }
}

public class Test
{
}

public class OrderPool : ITest, Test
{
    public int ChildCount
    {
        ge         


        
7条回答
  •  长情又很酷
    2020-12-19 07:18

    Simply because the language is designed like that. The reason is probably that a class can have only one base class, but implement any number of interfaces.

提交回复
热议问题