Sunday 29 December 2013

Different between delegate and event.

Delegate is function pointer. It is encapsulated function name.It is point to function with same signature of delegate.Multicast delegate is used for broadcast mechanism. One delegate is refer to multiple function and called all method simultaneously.
Event is used when some action happen when activity is perform in GUI. Activity is like button click,mouse hover ect. When activity is perform then associate action(delegate) is called and that delegate is called methods which are associated this delegate.
So, we can conclude that the delegate is encapsulate the methods and event is encapsulate the the delegate.

No comments:

Post a Comment