Retrieve als delegates for an event???

  • Thread starter Thread starter Lore Leuneog
  • Start date Start date
L

Lore Leuneog

Hi.

You can add new delegates for an event with += and you can remove delegates
from an event by using: -= but is there a way (method) to list all delegates
added to one event???

Sincerely
Greetings
Lore
 
Here's an example for getting the invocation list for your custom
event:

public event EventHandler myevent;

private void MyMethod()
{
foreach (Delegate del in myevent.GetInvocationList())
{
Console.WriteLine(del.Method.Name);
}

}
 
Back
Top