c# event

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi

with this code "group.PeerNodeChanged += new
PeerNodeChangeEventHandler(PeerNodeChanged);" i create an event in visual c#,
how can i disable this event when i dont need anymore.

thanks
 
Rui Abreu said:
with this code "group.PeerNodeChanged += new
PeerNodeChangeEventHandler(PeerNodeChanged);" i create an event in visual c#,
how can i disable this event when i dont need anymore.

Remove the listener like this:

group.PeerNodeChanged -= new PeerNodeChangeEventHandler
(PeerNodeChanged);
 
Back
Top