Component Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides the base implementation for the IComponent interface and enables object sharing between applications.
public ref class Component : MarshalByRefObject, IDisposable, System::ComponentModel::IComponent
public ref class Component : MarshalByRefObject, System::ComponentModel::IComponent
public class Component : MarshalByRefObject, IDisposable, System.ComponentModel.IComponent
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
[System.Runtime.InteropServices.ComVisible(true)]
public class Component : MarshalByRefObject, IDisposable, System.ComponentModel.IComponent
public class Component : MarshalByRefObject, System.ComponentModel.IComponent
type Component = class
inherit MarshalByRefObject
interface IComponent
interface IDisposable
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type Component = class
inherit MarshalByRefObject
interface IComponent
interface IDisposable
Public Class Component
Inherits MarshalByRefObject
Implements IComponent, IDisposable
Public Class Component
Inherits MarshalByRefObject
Implements IComponent
- Inheritance
- Derived
- Attributes
- Implements
Remarks
Component is the base class for all components in the common language runtime that marshal by reference. Component is remotable and derives from the MarshalByRefObject class. Component provides an implementation of the IComponent interface. The MarshalByValueComponent provides an implementation of IComponent that marshals by value.
You can host a Component in any object that implements the IContainer interface, and you can query and get services from its container. The container creates an ISite for each Component it contains. The container uses the site to manage the Component and is used by the Component to communicate with its container.
A Component should release resources explicitly by calls to its Dispose method, without waiting for automatic memory management through an implicit call to the Finalize method. When a