Events in vb.net
-
hi , i have a question about events in vb.net , im looking for a similar functionality to c# event registering , like how could i "unregister" an event during run time and then register it back. for example in c# myclass.myEvent -= new MyEvent(myHabdler); [code block , that i dont want the event will fire] myclass.myEvent += new MyEvent(myHabdler); thank you for your time!
Net
-
hi , i have a question about events in vb.net , im looking for a similar functionality to c# event registering , like how could i "unregister" an event during run time and then register it back. for example in c# myclass.myEvent -= new MyEvent(myHabdler); [code block , that i dont want the event will fire] myclass.myEvent += new MyEvent(myHabdler); thank you for your time!
Net
Hi, I suggest you read up on the AddHandler and RemoveHandler methods. They serve that very purpose. :)
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google - the quality and detail of your question reflects on the effectiveness of the help you are likely to get - use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
-
Hi, I suggest you read up on the AddHandler and RemoveHandler methods. They serve that very purpose. :)
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google - the quality and detail of your question reflects on the effectiveness of the help you are likely to get - use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets