IComponent


IComponent defines the contract that components must follow. IComponent specifies only one property and one event. The property is Site and is shown here:

 ISite Site { get; set; }

Site obtains or sets the site of the component. A site links the component with a container. This property is null if the component is not stored in a container.

The event defined by IComponent is Disposed and is shown here:

 event EventHandler Disposed

A client that needs to receive a notification when a component is destroyed registers an event handler through the Disposed event.

IComponent also inherits System.IDisposable, which defines the method Dispose( ), as shown here:

 void Dispose( )

This method frees any resources used by the object.




C# 2.0(c) The Complete Reference
C# 2.0: The Complete Reference (Complete Reference Series)
ISBN: 0072262095
EAN: 2147483647
Year: 2006
Pages: 300

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