Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Events & delegates

1,912 views

Published on

  • Be the first to comment

Events & delegates

  1. 1. Delegates & EventsMelick R. Baranasooriyahttp://melick-rajee.blogspot.com/
  2. 2. Delegate is ?• Reference to a method• Similar to Function pointers in c++• Implement run time functionality• very flexible• reusable,• Implement different functionality in run time• Implement Events • Event ?
  3. 3. Simple Delegate• Declaring a Delegate• Create Delegate Reference• Point to a Method• Execute
  4. 4. Delegate with Para• Declaring a Delegate• Create Delegate Reference• Point to a Method• Execute
  5. 5. Simple Event• Declare Delegate• Declare Corresponding Event• Call the Delegate when needed (raise the event)• Catch the event in the program
  6. 6. Event with Parameters• Declare Delegate• Declare Corresponding Event• Call the Delegate when needed (raise the event)• Catch the event in the program
  7. 7. THANK YOU!

×