private Exp theExp;
public Exp myExp {
get { return theExp; }
set { if (theExp != null) { /* unsubscribe all handlers from theExp */ }
theExp = value; if (theExp != null) { /* subscribe all handlers to theExp
*/ } }
}
Not really. In C#, the events are available for wiring by default, while in
VB you have to specify "WithEvents" to tell the compiler that you might want
(but might not want) to wire events.
--
David Anton www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C#/VB to C++ converter
Instant Python: C#/VB to Python converter
That was my first thought as well, but really, what makes withevents great
is that then the events become part of the class in there. What you need to
do also is add a proceedure to the class:
Exp myExp;
myExp.SomeEvent += EventHandler(MyEventHandler);
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.