Fei Li said:
I do not know if event handlers are called by the sequence of the subsription
sequence.
Yes, the event handlers will fire in the order in which they were subscribed to the
event.
The C# Language specification states that + and += can be used to add a delegate
to an invocation list, and in Section 7.13.2 that x += y is equivalent to x = x + y
provided the result of this operation can be typecast to the type of delegate that
x (your event) is.
Then in Section 15.1, the final paragraphs explains that the behavior of + on delegates
is that x = x + y yields an invocation list where x happens first, and y happens second
(i.e., left-to-right). Section 15.3 says that invocation happens synchronously in the
order of the delegates in the invocation list (also note that as additions are 'appended'
onto the end, Section 15.3 also requires that removals unsubscribe the latest instance
of a delegate in the invocation list if that delegate appears more than once).
Derek Harmon