Stop executing events

K

Kuba Florczyk

Hi

In my application one of class got event. But after calling EventHandlers i
want to stop execute rest if one of them set e.Handled = true.
How to do it?

kuba florczyk
 
V

Val Savvateev

Use GetInvocationList() method to get list of the event handlers. Invoke
each handler in a loop while checking if the event was "handled".

Val.
 

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