5.0 Introduction

 <  Day Day Up  >  

Behavior largely consists of responding to events. Something occurs, and it is our investigation and response to that event that determines what to do next . For instance, when we're assembling some new toy for the kids and a piece breaks, we adjust our behavior accordingly to respond to that event, whether it is to fix it or find some other mechanism to get the job done. With the advent of graphical user interfaces, event-driven programming added a layer on top of procedural programming. That's not saying that procedural programming was entirely replaced because some of its characteristics are in place today. Event-driven programming modifies the behavior of a program due to some internal or external change in state that requires special processing to handle that event.

This chapter looks at how events and their supporting constructs, delegates, work within the .NET Framework. Initially, you'll learn how to define and use delegates to lay the groundwork necessary to understand how events and event receivers work. You'll also see how you can propagate events to multiple receivers by using multicast delegates.

 <  Day Day Up  >  


Microsoft Visual C# .Net 2003
Microsoft Visual C *. NET 2003 development skills Daquan
ISBN: 7508427505
EAN: 2147483647
Year: 2003
Pages: 440

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