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

后端 未结 7 1739
伪装坚强ぢ
伪装坚强ぢ 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:21

    The order makes clear sense, the base class can implement members of the interface for the derived class, therefore the compiler must know of them beforehand

提交回复
热议问题