We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback
Platform : WinForms
Category : Patterns

How can I throw my events asynchronously?

You can do so by calling BeginInvoke on your delegates. Unfortunately, you can't call BeginInvoke() on the event member directly. You can invoke BeginInvoke()only if the delegate's internal list of sink callbacks (actually other delegates) has only one target in it. If you have more than one, the delegate throws an exception. The workaround is to iterate over the event delegate internal invocation list, calling BeginInvoke() on everyone of them. You access the internal list using the GetInvocationList() method. Here is an example: From Juval Löwy at www.idesign.net; from his article in the .Net Insight online magazine at www.fawcette.com.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon