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);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top