Figure 1. Isolate Complex Code.
You can isolate complex code by using inheritance to split functionality (as in the BaseMDIParent class)—or to allow multiple classes to reuse common code in the base class (as in the BaseEditForm class). BaseMDIParent provides the standard and dynamic menus, which you can override in the ApplicationMDIParent. BaseEditForm provides default behavior for displaying the form and managing state (in IsDirty and IsNew).