Name

IContainer

Synopsis

This interface is implemented by classes (such as Container) that hold and manage a set of Component objects. Contrast this with ISite, which binds a component to a host and provides the host’s services to that component. It provides members to Add() and Remove( ) a Component, and also get the set of Components in the container.


public interface IContainer : IDisposable {

// Public Instance Properties

   public ComponentCollection Components{get; }

// Public Instance Methods

   public void Add(IComponent component);

   public void Add(IComponent component, string name);

   public void Remove(IComponent component);

}

Implemented By

Container

Returned By

Component.Container, ISite.Container, ITypeDescriptorContext.Container, MarshalByValueComponent.Container

Passed To

System.Windows.Forms.ImageList.ImageList(), System.Windows.Forms.NotifyIcon.NotifyIcon(), System.Windows.Forms.Timer.Timer(), System.Windows.Forms.ToolTip.ToolTip()

Get .NET Windows Forms in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.