This documentation is archived and is not being maintained.

Complex Components

Visual Studio .NET 2003

Complex components consist of a lot of subordinate objects. For example, a graphics-rendering component might consist of brushes, pens, colors, and a variety of contained objects.

These contained objects may come from different sources. Your component might instantiate and contain classes that are part of the assembly in which it resides. They may call upon other assemblies, such as those in the .NET Framework, to provide the classes that they need to fulfill their functions. Or they may have the source code for these contained objects nested within their own code.

Nested classes are classes that are completely contained within another class declaration. They are useful for providing objects that are required by a particular class to function, but have no stand-alone functionality.

The following topics provide information on designing and implementing nested classes.

In This Section

Nested Classes in Components
Explains what nested classes are and how they can be useful.
Recommendations on Nested Classes in Components
Describes best practices for designing and implementing nested classes in your component.
Implementing Nested Classes
Demonstrates how to implement classes within classes.

Related Sections

Components that Contain Other Components
Provides background information on creating an object model.
Component Authoring
Gives advice and provides links to topics about authoring components.