public class EventsType { public event EventHandler> NewEvent;
public void SmthHappened(string data)
{
MyEventArgs
The answer to this question very much depends on the version you're using. It has been refined a lot over the years. See http://blogs.msdn.com/b/cburrows/archive/2010/03/05/events-get-a-little-overhaul-in-c-4-part-i-locks.aspx
Yup: C# 4 has made some changes in this area, basically. It makes it thread-safe without locking. That's not the only change - it also changes how references to field-like events within the class are resolved: += and -= now go through the "add" and "remove" bits rather than working directly with the backing field.
Note that this change affects code compiled with the C# 4 compiler even against older frameworks; there are also changes to locking which only affect code compiled against .NET 4, as it uses a new method (Monitor.TryEnter(object, out bool)).
What you are expecting is a simple non thread safe implementation. The field like event syntax always provide thread-safe syntax (hence the reflector version). Refer this artcile for understanding events & how they get implemented.