|
-
May 7th, 2007, 02:29 PM
#1
Thread Starter
New Member
What Event does over the delegate?
Hai all,
What does a Event does in the C# over the delegate, to my knowledge the delegates are similar to an functional pointer to a function or method whatever you call. Delegare invoke the function byref which it hold, and the event inturn call the delegate assigned when any event or action triggerd.
My question: why can't we straightly invoke a delegate rather than going for a event?
-
May 7th, 2007, 06:06 PM
#2
Re: What Event does over the delegate?
An event is basically a list of delegates. Each method that will act as a handler for the event gets added to that list. When the event is to be raised you only have to invoke the event itself to invoke every delegate containing an event handler. If the event mechanism didn't exist you have to invoke each delegate individually.
-
May 20th, 2007, 03:27 PM
#3
Thread Starter
New Member
Re: What Event does over the delegate?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|