home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2005 June (DVD) / DPPRO0605DVD.iso / dotNETSDK / SETUP.EXE / netfxsd1.cab / ReadMe_xml_6________.3643236F_FC70_11D3_A536_0090278A1BB8 < prev    next >
Encoding:
Extensible Markup Language  |  2002-06-20  |  2.3 KB  |  49 lines

  1. ∩╗┐<?xml version='1.0'?>
  2. <?xml-stylesheet type="text/xsl" href="..\..\readme.xsl"?>
  3.  
  4. <sample>
  5. <title>Delegates and Events Sample</title>
  6. <title-short>Chat</title-short>
  7. <overview>
  8. The purpose of this sample is to introduce developers to delegates and events. Delegates and events are a type-safe method callback mechanism. The sample declares a ΓÇ£chatΓÇ¥ server type that multiple ΓÇ£clientsΓÇ¥ can connect to. Each client registers a delegate (callback method) with the server. Then, when one client sends a string message to the server, the server forwards the message to all registered clients. This code has two implementations. The first uses delegates showing low-level callback mechanism. The second implementation uses events showing how events hide most of the low-level goo associated with delegates. 
  9. </overview>
  10. <subdirectory>Technologies\DelegatesAndEvents</subdirectory>
  11. <buildsteps>
  12.    <step>
  13.       Type <richcontent bold="T">BUILD.bat</richcontent>
  14.       <richcontent> from the command line.</richcontent>      
  15.       <example>
  16.          C:\Program Files\Microsoft.NET\SDK\v1.1\Samples\Technologies\DelegatesAndEvents\VB>Build.bat
  17.       </example>
  18.    </step>
  19. </buildsteps>
  20. <runsteps>
  21.    <step>
  22.       Type <richcontent bold="T">Chat.exe</richcontent><richcontent> from the command line.</richcontent>
  23.       <example>
  24.          C:\Program Files\Microsoft.NET\SDK\v1.1\Samples\Technologies\DelegatesAndEvents\VB>Chat.exe
  25.       </example>
  26.    </step>   
  27. </runsteps>
  28. <technologies>   
  29.    <technology name = "Delegates" keyword="T">
  30.       <class name = "Delegate" keyword="T">
  31.          The delegate class is used as the base class for derived delegate classes. Delegate classes are used to encapsulate a callback method in a type-safe way.
  32.       </class>            
  33.    </technology>
  34.    <technology name = "Garbage Collection" keyword="T">
  35.       <class name = "GC" keyword="T">
  36.          Used to suppress the execution of the finalize method on types that have already been "Disposed".
  37.       </class>  
  38.    </technology>    
  39. </technologies>
  40. <keywords>
  41.    <word name="Events" keyword="T"/>
  42.    <word name="Delegate" keyword="T"/>
  43.    <word name="Delegates" keyword="T"/>
  44.    <word name="Callbacks" keyword="T"/>
  45.    <word name="Callback Functions" keyword="T"/>
  46. </keywords>
  47. </sample>
  48.  
  49.