Control Class
All controls are derived from the System.Windows.Forms.Control base class, which provides an extensive set of properties, methods, and events for all controls, giving the controls their basic functionality. Many of the most common and useful members will be described in this and subsequent chapters.
Class Hierarchy
The Control class is not instantiated directly; only derived classes are instantiated. Figure 7-1 shows the class hierarchy for the Control classes.
System.Object is the ultimate base class of all controls (as well as all classes in the .NET Framework). The Object class provides low-level services to all classes through methods such as ToString (which returns a String that represents the Object in a culture-sensitive, human-readable format). It is very common for classes to override the Object methods.
The next level in the class hierarchy is System.MarshalByRefObject, which provides services to applications that support remoting.
Tip
Remoting, the process of moving objects across application domain or machine boundaries, is beyond the scope of this book but is discussed in Jesse Liberty's Programming C# (O'Reilly).
The System.ComponentModel.Component class provides an implementation of the IComponent interface, which enables the logical containment of components in a container. It provides the Container, Events, and other properties, as well as the Dispose method (which releases resources used by a component), all of which are important to the implementation of ...
Get Programming .NET Windows Applications 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.