Urgent: Event Handler Recursion
Posted on 2004-09-16
Does anyone know what the exact behavior of the following scenario would be:
1. Class c1 has an event e1.
2. Class c2 has an event handler eh1
3. Instance c2a's eh1 method is attached as a handler for the event c1a.e1.
4. Event c1a.e1 is raised once.
5. Inside the c2a.eh1 handler, 2 new instances of c2 (c2b and c2c) are instantiated, and their eh1 methods are attached as handlers for the same event c1a.e1.
So the question is, will the method eh1 get called 1 time, or 3 times, or is it ambiguous?
Or in other words, at what point during the raising of an event does adding/removing handlers stop applying to the event already being raised?