Hi Goutsev,
You are right. My mistake. Was not thinking when I typed the response
Kumar
"Stoitcho Goutsev \(100\) [C# MVP]" <(E-Mail Removed)> wrote in message news:<#(E-Mail Removed)>...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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
> >
> >
> > "MrNobody" <(E-Mail Removed)> wrote in message
> > news:7488D6CA-34DB-4150-8375-(E-Mail Removed)...
> >> If i add an event handler to a particular event on a Control, can I
> consume
> >> events that are triggered so any other handlers registered to the same
> event
> >> do not process their code?
> >
> >
|