GetInvocationList - Getting the delegates wired up to an event

  • Thread starter Thread starter Phil Jones
  • Start date Start date
P

Phil Jones

I'm wanting to retrieve a list of all the delegates that have resulted from
Events being wired up to my class.

I can see (and have been told) that "GetInvocationList" is the method to use
for this, but I can't see how, from within my class, I use this method to
achieve this. What is the delegate I'm calling GetInvocationList on??

Can someone show me what to do here please? Many thanks!

===
Phil
(Auckland | Aotearoa)
 
Thanks Sijin,

So from within an instance of the class - how do get access to the instance
of the event delegate class? The event delegate class would be
automatically created from any procedure wiring up events right?

Cheers,

===
Phil Cockfield
(Auckland | Aotearoa)
 
To answer my own question. This wasn't so obvious because I was coming at
it with VB.NET, where the corresponding multi-cast delegate field is hidden
(not so in C#).

In VB just reference "<eventName>Event" and there it is.

Simple when you know how. Cheers everyone.
===
Phil
(Auckland | Aotearoa)
 
Hi Phil,

Thank you for sharing the experience in the community if you still have any
concern on this issue,please feel free to post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top