Possible Duplicate:
Is there an actual difference in the 2 different ways of attaching event handlers in C#?
I'm working on a .NET application and I ran into a small syntax dilemma. I noticed there were two ways of unsubscribing from an event and I'm curious. Is there any difference between the two, or are they equal? Is there any scenario, when they may act differently? Compiler doesn't seem to have problem with either of those.
object.myEvent += new EventHandler(callback_function);
object.myEvent -= new EventHandler(callback_function);
and
object.myEvent += new EventHandler(callback_function);
object.myEvent -= callback_function;
Thanks