Summary


This chapter has introduced you to some of the basic concepts around event-based programming as well as many advanced topics. Delegates are type-safe references to methods that can be invoked in the same manner as methods and they can also be used as parameters to other methods.

Events are special multicast delegates that provide a mechanism by which classes can notify other classes when events of significance take place, whether those events are related to the user interface, to data sources, or to object state.

In the last section of the chapter you saw that event programming can be extremely powerful by allowing developers to write their own code for the add and remove accessors for an event and allowing an event to selectively choose which targets receive the event notification.

When you consider all of this information and add to it the fact that events can be transmitted between GUI controls, between logical tiers or layers, and even between different applications separated by the Internet or an intranet, the idea of adopting and using events in your everyday programming tasks becomes extremely appealing.



Microsoft Visual C# 2005 Unleashed
Microsoft Visual C# 2005 Unleashed
ISBN: 0672327767
EAN: 2147483647
Year: 2004
Pages: 298

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