System.Object being the base class

后端 未结 8 1018
北荒
北荒 2020-12-03 15:47

This question may be usual for many, i tried for an hour to understand the things but getting no proper explanation.

MSDN says, System.Object is the ultimate

8条回答
  •  囚心锁ツ
    2020-12-03 16:15

    You can't inherit two classes, but you can inherit a hierarchy of classes.

    System.Object
        |
         \-- Class A {}
             |
              \-- Class B {}
    
    
    
    public class ClassA
    {
    }
    
    public class ClassB : ClassA
    {
    }
    
    public class ClassC : ClassB
    {
    }
    

提交回复
热议问题