home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2005 June (DVD) / DPPRO0605DVD.iso / dotNETSDK / SETUP.EXE / netfxsd1.cab / FL_Events_xml________.3643236F_FC70_11D3_A536_0090278A1BB8 < prev    next >
Encoding:
Extensible Markup Language  |  2001-08-21  |  1.2 KB  |  21 lines

  1. <?xml version="1.0"?>
  2. <?xml-stylesheet type="text/xsl" href="CLI.xsl"?>
  3. <Document Title="Events">
  4.     <Paragraph>
  5.         Frequently, objects want to register themselves with another object so that they receive notifications for certain events. For example, you might have some object that wants to receive a             notification when a Button object is clicked. To offer this notification, the Button object offers a Click event. Other objects can create delegates (callback methods) and register themselves with the         event. Then, when the user clicks the Button, the button object fires the event which sends the notification to all objects that have previously registered themselves with the Button object.
  6.     </Paragraph>
  7.     <Paragraph>
  8.         The code below shows how to create a type whose instances exposes an event, how another object can register itself with that event and then how the event gets fired.
  9.     </Paragraph>
  10.     <Paragraph>
  11.         <Sample Caption="Events" Image="..\Images\Console.gif">
  12.             <CSPath>..\Samples\TypeMembers\Events\CS</CSPath>
  13.             <VBPath>..\Samples\TypeMembers\Events\VB</VBPath>
  14.         </Sample>
  15.     </Paragraph>
  16.     <Navigation>
  17.         <Previous>Index Properties.xml</Previous>
  18.         <Next>Exception Handling.xml</Next>
  19.     </Navigation>
  20. </Document>
  21.