Are C# events synchronous?

This is a general answer and reflects the default behavior:

  1. Yes, it blocks the thread, if the methods subscribing to the event are not asynchronous.
  2. They are executed one after the other. This has another twist: If one event handler throws an exception, the event handlers not yet executed will not be executed.

Having said that, every class that provides events can choose to implement its event asynchronously. IDesign provides a class called EventsHelper that simplifies this.

[Note] this link requires you to provide an e-mail address to download EventsHelper class. (I am not affiliated in any way)

Leave a Comment