So, if i understand, I'd should do something like this (code inside a class,
hence the 'this' reference):
EventHandler* handler = new EventHandler( this, m_Handler ) ; //
this->m_Handler is of proper form
timer->Tick += handler ;
and then remove it via:
timer->Tick -= handler ; // this 'handler' is the same variable as above
Is this correct?
"Nishant Sivakumar" <ni**@nospam.asianetindia.com> wrote in message
news:Of*************@tk2msftngp13.phx.gbl...
You could keep an ArrayList of all the delegates you've added to the event
and then remove them one by one using the -= operator.
--
Regards,
Nish [VC++ MVP]
"Peter Oliphant" <po*******@RoundTripInc.com> wrote in message
news:ey**************@TK2MSFTNGP12.phx.gbl... In general, some controls can have events handlers attached to them,
typically via the += operator. How does one remove an event handler added
this way? Or, just as good for my purposes, how can one remove all event
handlers attached?