Events andDelegates Programming in C# firstname.lastname@example.org
Delegates are objects that contain references to method that need to beinvoked instead of containing the actual method names. call any method, which is identified only at runtime. to associate a delegate with a particular method, the method musthave the same return type and parameter type as that of the delegate.
1. Declaring delegates2. Create the method to be referenced3. Instantiating delegates4. Callhttps://gist.github.com/2427445
Events a way for a class to provide notifications to clients of that class when some interesting thing happens to an object.
Implement Events 1. Define a public delegate for the event 2. Create the event using the delegate 3. Subscribe to listen and handle the event 4. Raise the event https://gist.github.com/2427324