Creating Components (Visual C#)
The term component in the software industry is often used to refer to a reusable object that exposes one or more interfaces to clients in a standardized way. A component may be implemented as a single class, or as a set of classes; the primary requirement is that the basic public interface be well-defined. For example, in the context of native Windows programming, the Component Object Model (COM) requires that all components implement theinterface in addition to any other specialized interfaces.
In the context of the .NET Framework, a component is a class or set of classes that implements theinterface or one that derives directly or indirectly from a class that implements this interface. The default base class implementation of the IComponent interface is .
Some of the most commonly used components in .NET Framework programming are the visual controls that you add to Windows Forms such as the, , and so on. Non-visual components include the , , and among others.
When you create a component in C#, it can be used by clients written in any other language that conforms to the.
To create your own components in Visual C#, you can use theto assemble non-visual component classes in the same way that you assemble Windows Forms. For more information, see .
For more information about component programming using Visual Studio, see.