G
Guest
Hi there. I'm referring to
http://msdn.microsoft.com/library/d...s/cpguide/html/cpconraisingmultipleevents.asp
The article implies that rather than having one field backing each event
that your class has, you can use this alternate method if you have many
fields in your class. However, the example has 2 events and has two objects
backing those events where the delegates are stored for those events. How is
this a savings? Is it talking about the case where many delegates
representing methods are later hooked into the event? Because the class
developer wouldn't have knowledge of that. Also, what is the following:
protected Delegate GetEventHandler(object key) {...}
What code goes in there? what is the "key?"
Thanks for any help...
-Ben
http://msdn.microsoft.com/library/d...s/cpguide/html/cpconraisingmultipleevents.asp
The article implies that rather than having one field backing each event
that your class has, you can use this alternate method if you have many
fields in your class. However, the example has 2 events and has two objects
backing those events where the delegates are stored for those events. How is
this a savings? Is it talking about the case where many delegates
representing methods are later hooked into the event? Because the class
developer wouldn't have knowledge of that. Also, what is the following:
protected Delegate GetEventHandler(object key) {...}
What code goes in there? what is the "key?"
Thanks for any help...
-Ben