System.ComponentModel.Component Class

Provides the base implementation for the System.ComponentModel.IComponent interface and enables object sharing between applications.

See Also: Component Members

Syntax

[System.ComponentModel.DesignerCategory("Component")]
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
[System.Runtime.InteropServices.ComVisible(true)]
public class Component : MarshalByRefObject, IComponent, IDisposable

Remarks

System.ComponentModel.Component is the base class for all components in the common language runtime that marshal by reference. System.ComponentModel.Component is remotable and derives from the MarshalByRefObject class. System.ComponentModel.Component provides an implementation of the System.ComponentModel.IComponent interface. The System.ComponentModel.MarshalByValueComponent provides an implementation of System.ComponentModel.IComponent that marshals by value.

You can host a System.ComponentModel.Component in any object that implements the System.ComponentModel.IContainer interface, and you can query and get services from its container. The container creates an System.ComponentModel.ISite for each System.ComponentModel.Component it contains. The container uses the site to manage the System.ComponentModel.Component and is used by the System.ComponentModel.Component to communicate with its container.

A System.ComponentModel.Component should release resources explicitly by calls to its Component.Dispose method, without waiting for automatic memory management through an implicit call to the object.Finalize method. When a System.ComponentModel.Container is disposed, all components within the System.ComponentModel.Container are also disposed.

Requirements

Namespace: System.ComponentModel
Assembly: System (in System.dll)
Assembly Versions: 1.0.3300.0, 1.0.5000.0, 2.0.0.0, 4.0.0.0