Hi,
i need a solution for a problem where I want to raise an event from
a complete different Class. Here my Example.
I have class1 where I want to invoke an Event.
Then I have a 2nd Class which will be executed in a different Thread.
Because I need to check a message queue. If there is something in the
messagequeue which I need I want to invoke an Event in the Class 1.
How can that be done. Please post just a small hello world example.
Thanks.
Loading
Dipal ChoksiPosted Sep 6, 2010, 5:29 PM
The only way to invoke an external object's event would be through reflection and that doesn't result in very clean code.
I would second a public method or encapsulating the event raise in a public method if you need to reuse the same code.
Hope this helps!
Dipal
Suthish NairPosted Sep 6, 2010, 3:31 PM
create a public shared method, and then call it in class1