Removing Handler... URGENT
-
Hi, To remove Event Handlers from my all controls in the form, I want to use a generic code as follows. 1) Run through all controls in the Form 2) Run through all Events of a control using Reflection .GetEvents() 3) For each Event, I want to get the Delegate, so that I can remove all using GetInvocationList(). but .NET doesn't provide any property to get delegate for the Event Handler. Please help. How can I get the Delegate for the Event Handler.
-
Hi, To remove Event Handlers from my all controls in the form, I want to use a generic code as follows. 1) Run through all controls in the Form 2) Run through all Events of a control using Reflection .GetEvents() 3) For each Event, I want to get the Delegate, so that I can remove all using GetInvocationList(). but .NET doesn't provide any property to get delegate for the Event Handler. Please help. How can I get the Delegate for the Event Handler.
Does EventInfo.EventHandlerType[^] work? Regards Senthil _____________________________ My Blog | My Articles | WinMacro
-
Does EventInfo.EventHandlerType[^] work? Regards Senthil _____________________________ My Blog | My Articles | WinMacro
That only gives the Delegate type, but how to actually get the reference to the Delegate?