How many event handlers registered for an event

  • Thread starter Thread starter Marina
  • Start date Start date
M

Marina

Hi,

Is there a way to find out if any event handlers are registered for a given
event of a given object?
 
Found the answer.

You can do something like: MyEventNameEvent.GetInvokationList().Length, to
get the number of invokations that will be made. Just append 'Event', to
the name of your event (in this case, it's 'MyEventName').
 
Back
Top