You aren't going to be able to do this. The framework does not allow
you to invoke an event from outside of the class (it is a security
violation, if you think about it, being able to execute code from a class,
saying you are from that class).
The only way I can think of to do this would be to get the delegate list
through reflection, and then invoke that. However, I wouldn't recommend it.
Instead, I would just expose the delegate list somehow, and invoke it
manually.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"perspolis" <re*****@hotmail.com> wrote in message
news:u3**************@TK2MSFTNGP12.phx.gbl...
Hi
I have some textbox and add event handler for some their events.
I want to invoke their event handlers without using name of event
handlers.
I mean for example :
this.textBox1.TextChanged+=new EventHandler(textChanged1);
I want to invoke TextChanged event without using textChanged1 event
handler.
thanks in advance