Synopsis: | Do not make assumptions on the object's state after raising an event |
Language: | C# |
Severity Level: | 2 |
Category: | Delegates and events |
Description: |
Prepare for any changes to the current object's state while executing an event handler. The event handler may have called other methods or properties that changed the object's state (e.g. it may have disposed objects referenced through a field). Typically raising an event should be the last statement in a method. |