Events & delegates

  • 1,153 views
Uploaded on

 

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,153
On Slideshare
0
From Embeds
0
Number of Embeds
29

Actions

Shares
Downloads
6
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Delegates & EventsMelick R. Baranasooriyahttp://melick-rajee.blogspot.com/
  • 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. Simple Delegate• Declaring a Delegate• Create Delegate Reference• Point to a Method• Execute
  • 4. Delegate with Para• Declaring a Delegate• Create Delegate Reference• Point to a Method• Execute
  • 5. Simple Event• Declare Delegate• Declare Corresponding Event• Call the Delegate when needed (raise the event)• Catch the event in the program
  • 6. Event with Parameters• Declare Delegate• Declare Corresponding Event• Call the Delegate when needed (raise the event)• Catch the event in the program
  • 7. THANK YOU!