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 base class of all classes in the .NET Framework; it is the root of the type hierarchy.
When C# doesn’t allow multiple inheritance, how can I inherit, say a Class A to Class B. ? Because all classes, already inherits from System.Object right?
Here I am talking about the normal inheritance.
Class A { --- }
Class B : A { --- }
Please, clear my doubts.
Thank you.
Update:
Again, My doubt is about, All classes inheriting from System.Object, then that would make Class B having Class A as well as System.Object. From my above example
Correct, C# only allows single inheritence. The System.Object class is inherited implicitly by your Class A. So Class B is-a A, which is-a System.Object. This is taken care of by the compiler so you don’t need to explicitly say that
Class A : System.Object(though you can if you want).