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

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

    You can only inherit from one base class but many interfaces. So if there is more than one type listed you know that the first one is a class, the others interfaces. This works regardless of class/interface naming conventions

    0 讨论(0)
提交回复
热议问题