Login
Nederlands
About
Consulting
Projects
Resume
Contact Me!
Any fool can write code that a computer can understand.
Good programmers
write code that
humans
can
understand
.
- Martin Fowler
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
)
;