This documentation is archived and is not being maintained.

Authoring Components

Visual Studio .NET 2003

There are as many ways to approach a programming problem as there are programmers, and creating your own components is just another programming task. With that in mind, the following steps represent a fairly comprehensive approach.

To author a component

  1. Determine what you want your component to accomplish, or what part it will play in your application.
  2. If you have a more complex component and need an object model, outline the model. For more information, see Component Object-Model Recommendations
  3. If necessary, divide up functionality between the component and any subobjects or structures in its object model. For more information, see Nested Classes in Components.
  4. Determine the best class or component to use as a base class for your component. Generally speaking, your base class will already implement many of the properties and methods that your class will need.
  5. If you have subobjects, determine the best class or component to use as a base class for them.
  6. Determine what functionality your component can provide by incorporating components from the .NET Framework classes.
  7. If you need to factor out subsets of your component's functionality as interfaces, determine which classes need to implement them.
  8. Express functionality as properties, methods, and events of the component and its subobjects or subsidiary structures. For more information, see Implementing Properties, Methods, Members, and Events in Components.
  9. Assign appropriate access levels (Public, Private, and so on). For more information, see Ways to Implement Component Functionality.
  10. Test and debug your component. As you add each feature, add features to your test project to exercise the new functionality.
  11. Repeat, refining the design.

See Also

Walkthrough: Authoring a Component with Visual Basic .NET | Walkthrough: Authoring a Component with Visual C# | Troubleshooting Control and Component Authoring