.NET class inherits object class by default. How?

后端 未结 3 1710
猫巷女王i
猫巷女王i 2021-01-22 04:54

When we create a class Product

class Product
{
}

What I have learned from different blogs and books that Object class is the super

3条回答
  •  离开以前
    2021-01-22 05:14

    As per MSDN:

    Supports all classes in the .NET Framework class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all classes in the .NET Framework; it is the root of the type hierarchy.

    And why do you not 'see' this in the code:

    Languages typically do not require a class to declare inheritance from Object because the inheritance is implicit.

    So in short the .Net type system does this implicit.

提交回复
热议问题