Container Property
Collapse the table of content
Expand the table of content

Component.Container Property

Gets the IContainer that contains the Component.

[Visual Basic]
Public ReadOnly Property Container As IContainer
public IContainer Container {get;}
public: __property IContainer* get_Container();
public function get Container() : IContainer;

Property Value

The IContainer that contains the Component, if any.

This value is a null reference (Nothing in Visual Basic) if the Component is not encapsulated in an IContainer.


The components in a container are tracked in a first-in, first-out list, which also defines the order of the components within the container. The last component added is the last component in the list.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Component Class | Component Members | System.ComponentModel Namespace | IContainer | Container

© 2015 Microsoft