Delegate Class

Overview

  • Holds a reference to a method.
  • Declared as a single line, the framework provides the underlying implementation.

Good practice

  • A delegate should contain 2 parameters, an object sender and event arguments.
  • You should derive from EventArgs to supply custom event data.

Examples

Simple Delegate

public delegate void MyEventHandler(object sender, EventArgs e);
 
learning/exam70-536/delegate.txt · Last modified: 2008/08/26 11:52 by david
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki