Container

Container disposable

System.ComponentModel (system.dll) class

This class provides an implementation of the IContainer interface to encapsulate a queue of Component objects.

You can Add() and Remove() components from the queue, and get a collection of all the Components it contains.

When an instance is disposed, it will call Dispose( ) on all the Component objects it owns.

 public class  Container  : IContainer, IDisposable {  // Public Constructors  public  Container  ();  // Public Instance Properties  public virtual ComponentCollection  Components  {get; }  // implements IContainer   // Public Instance Methods  public virtual void  Add  (IComponent  component  );  // implements IContainer  public virtual void  Add  (IComponent  component  , string  name  );  // implements IContainer  public void  Dispose  ();  // implements IDisposable  public virtual void  Remove  (IComponent  component  );  // implements IContainer   // Protected Instance Methods  protected virtual ISite  CreateSite  (IComponent  component  , string  name  );    protected virtual void  Dispose  (bool  disposing  );    protected override void  Finalize  ();  // overrides object  protected virtual object  GetService  (Type  service  ); } 


. Net Windows Forms in a Nutshell
.NET Windows Forms in a Nutshell
ISBN: 0596003382
EAN: 2147483647
Year: 2002
Pages: 794

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net