IContainer Interface

 

Provides functionality for containers. Containers are objects that logically contain zero or more components.

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

[<ComVisibleAttribute(true)>]
type IContainer = 
    interface
        interface IDisposable
    end

NameDescription
System_CAPS_pubpropertyComponents

Gets all the components in the IContainer.

NameDescription
System_CAPS_pubmethodAdd(IComponent)

Adds the specified IComponent to the IContainer at the end of the list.

System_CAPS_pubmethodAdd(IComponent, String)

Adds the specified IComponent to the IContainer at the end of the list, and assigns a name to the component.

System_CAPS_pubmethodDispose()

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

System_CAPS_pubmethodRemove(IComponent)

Removes a component from the IContainer.

Containers are objects that encapsulate and track zero or more components. In this context, containment refers to logical containment, not visual containment. You can use components and containers in a variety of scenarios, including scenarios that are both visual and not visual.

Notes to Implementers:

To be a container, the class must implement the IContainer interface, which supports methods for adding, removing, and retrieving components.

The following code example demonstrates how to implement the IContainer interface.

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: