IComponent Interface
TOC
Collapse the table of content
Expand the table of content

IComponent Interface

 

Provides functionality required by all components.

Namespace:   System.ComponentModel
Assembly:  System (in System.dll)

[<TypeConverterAttribute(typeof(ComponentConverter))>]
[<ComVisibleAttribute(true)>]
type IComponent = 
    interface
        interface IDisposable
    end

NameDescription
System_CAPS_pubpropertySite

Gets or sets the ISite associated with the IComponent.

NameDescription
System_CAPS_pubmethodDispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.(Inherited from IDisposable.)

NameDescription
System_CAPS_pubeventDisposed

Represents the method that handles the Disposed event of a component.

Component is the default implementation of IComponent and serves as the base class for all components in the common language runtime.

You can contain components in a container. In this context, containment refers to logical containment, not visual containment. You can use components and containers in a variety of scenarios, both visual and non visual.

System.Windows.Forms.Control inherits from Component, the default implementation of IComponent.

A component interacts with its container primarily through a container-provided ISite, which is a repository of container-specific per-component information.

Notes to Implementers:

To be a component, a class must implement the IComponent interface and provide a basic constructor that requires no parameters or a single parameter of type IContainer. For more information about implementing IComponent, see Programming with Components.

The following code example demonstrates how to implement the IComponent, ISite, and IContainer interfaces.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show:
© 2016 Microsoft