KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Is there a problem if I subscribe to the same event three times with the eventHandler? e.g. a.SomethingChanged += new EventHandler(ChangeHandler); a.SomethingChanged += new EventHandler(ChangeHandler); a.SomethingChanged += new EventHandler(ChangeHandler); Does this cause ChangeHandler to be invoked 3 times instead of 1? What is best way to handle this? Note that these redundancies are not together but different areas of code paths. Similary, is there an issue with unsubscribing from an event that is not registered? e.g. a.SomethingChanged -= new EventHandler(ChangeHandler); //ChangeHandler was never registered
Tags (comma-separated)
Save Edits
Cancel