How many event handlers registered for an event

M

Marina

Hi,

Is there a way to find out if any event handlers are registered for a given
event of a given object?
 
M

Marina

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').
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top