Hi Kamur,
In the case of events += -= are translated by the compiler into calls to add
and remove event accessors. Using = with events on the other hand makes the
compiler t ogenerate an error message. Using = operator is possible when it
goes for variables of some delegate type, but not for events.
To answer to the original poster.... No, it is not possible. Even if it was
you cannot know how many handlers has been already registered, so to cancel
the handlers invokation won't lead to any good.
--
Stoitcho Goutsev (100) [C# MVP]
Kumar Reddi said:
Yeah, When you are attaching an event handler to an event, you use "+="
syntax, this adds to the list of handlers, if you simply use "=", that is
the only event handler that can recieve the event