Work = New ExampleWork()
Here the Work
is a withevents
variable and I've used the handles clause for handling various events fired by the ExampleWork
object. However the event handler will not get assigned till the constructor of the ExampleWork
returns. Now how can I handle any events fired from the constructor? I can move the constructor logic out to a separate method and call it after the constructor has returned and thus handle all the fired events including events fired from constructor. However it doesn't look good.
What is the best way to handle such a situation?