System.Object: The Ultimate Base Class
The .NET Framework class library contains a class called System.Object from which all classes are ultimately derived. This is due to two facts. First, whenever you create a class without specifying a base class for it, C# automatically specifies System.Object to be its base class. Second, any chain of derived classes will always have a topmost class (like TransportVehicle in Figure 16.9 of Chapter 16) that does not have any base class specified. This topmost class will then automatically get System.Object as its base class, and any descendants will inherit the class members from System.Object.
System.Object deserves a closer look, because any class inherits its useful class members. Table 17.1 provides an ...
Get C# Primer Plus now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.