Provides the base implementation for the IComponent interface and enables object sharing between applications.
Assembly: System (in System.dll)
<ComVisibleAttribute(True)> _
<ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)> _
Public Class Component _
Inherits MarshalByRefObject _
Implements IComponent, IDisposable[ComVisibleAttribute(true)]
[ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)]
public class Component : MarshalByRefObject, IComponent,
IDisposable[ComVisibleAttribute(true)]
[ClassInterfaceAttribute(ClassInterfaceType::AutoDispatch)]
public ref class Component : public MarshalByRefObject,
IComponent, IDisposable[<ComVisibleAttribute(true)>]
[<ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)>]
type Component =
class
inherit MarshalByRefObject
interface IComponent
interface IDisposable
endThe Component type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | CanRaiseEvents | Gets a value indicating whether the component can raise an event. |
![]() | Container | Gets the IContainer that contains the Component. |
![]() | DesignMode | Gets a value that indicates whether the Component is currently in design mode. |
![]() ![]() | Events | Gets the list of event handlers that are attached to this Component. |
![]() ![]() | Site | Gets or sets the ISite of the Component. |
| Name | Description | |
|---|---|---|
![]() | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.) |
![]() ![]() | Dispose | Releases all resources used by the Component. |
![]() ![]() | Dispose(Boolean) | Releases the unmanaged resources used by the Component and optionally releases the managed resources. |
![]() ![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() ![]() | Finalize | Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (Overrides Object |
![]() ![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
![]() | GetService | Returns an object that represents a service provided by the Component or by its Container. |
![]() ![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
![]() ![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.) |
![]() ![]() | ToString | Returns a String containing the name of the Component, if any. This method should not be overridden. (Overrides Object In XNA Framework 3.0, this member is inherited from Object |
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 Container is disposed, all components within the Container are also disposed.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.System
System.ComponentModel
Microsoft.VisualBasic.Compatibility.VB6
System.CodeDom.Compiler
System.ComponentModel
System.Configuration.Install
System.Data.Common
System.Data.Common
System.Data.Common
System.Data.Common
System.Diagnostics
System.Diagnostics
System.Diagnostics
System.Diagnostics
System.Diagnostics
System.Diagnostics
System.DirectoryServices
System.DirectoryServices
System.Drawing.Printing
System.IO
System.IO.Ports
System.Management
System.Management
System.Management
System.Media
System.Messaging
System.Messaging
System.Net.NetworkInformation
System.Net
System.Runtime.Remoting.Services
System.Runtime.Remoting.Services
System.ServiceProcess
System.ServiceProcess
System.Timers
System.Web.Services.Protocols
System.Web.UI.WebControls
System.Windows.Forms
System.Windows.Forms
System.Windows.Forms
System.Windows.Forms
System.Windows.Forms
System.Windows.Forms
System.Windows.Forms.Design
System.Windows.Forms
System.Windows.Forms
System.Windows.Forms
System.Windows.Forms
System.Windows.Forms
System.Windows.Forms
System.Windows.Forms
System.Windows.Forms
System.Windows.Forms
System.Windows.Forms
System.Windows.Forms
.gif)
.gif)
.gif)
.gif)
.gif)
.gif)