Info. Remove Event Handler(Object, Delegate) Method
Removes an event handler from an event source.
public: virtual void RemoveEventHandler(System::Object ^ target, Delegate ^ handler);
public virtual void RemoveEventHandler (object target, Delegate handler);
public void RemoveEventHandler (object target, Delegate handler);
abstract member RemoveEventHandler : obj * Delegate -> unit override this.RemoveEventHandler : obj * Delegate -> unit
Public Overridable Sub RemoveEventHandler (target As Object, handler As Delegate)
Public Sub RemoveEventHandler (target As Object, handler As Delegate)
The event source.
The delegate to be disassociated from the events raised by target.
The event does not have a public
The handler that was passed in cannot be used.
nulland the event is not static. -or- The EventInfo is not declared on the target.
This method attempts to remove the delegate that may synchronize this event on the target object.
When an event is raised by target, the method or methods encapsulated by
handler will no longer be invoked.