共用方式為


Component Classes 

Both classes and components are units of reusable code. To author a component, you start with a class. A class becomes a component when it conforms to a standard for component interaction. This standard is provided through the IComponent interface. Any class that implements the IComponent interface is a component. For details about interfaces, see Interfaces (C# Programming Guide) and Interfaces in Visual Basic. Such standards allow developers to plug components together quickly to create larger programs. The common language specification (CLS) describes the way components authored for the common language runtime can interact. For details, see Common Language Specification

The .NET Framework provides the IComponent interface and the Component base class to make it easy to author components that work well in the design environment, and UserControl and Control classes that make it easy to author visual components.

In This Section

Topic Location
Component Authoring Walkthroughs Windows Forms Custom Controls
Component Authoring Walkthroughs Windows Forms Custom Controls
Component Authoring Walkthroughs Windows Forms Custom Controls

See Also

Reference

Component
IComponent
IDesigner