Removes an event handler from an event source.
Implementation of this member is not complete for this release of the NGWS SDK. This documentation is for information only.
[Visual Basic] Public Sub RemoveEventHandler( _ ByVal target As Object, _ ByVal handler As Delegate _ ) [C#] public void RemoveEventHandler( object target, Delegate handler ); [C++] public: void RemoveEventHandler( Object* target, Delegate* handler ); [JScript] public function RemoveEventHandler( target : Object, handler : Delegate );
Exception Type | Condition |
---|---|
ArgumentException | target or handler is a null reference (in Visual Basic Nothing). |
AccessException | The caller does not have permission to invoke the "remove" method on the event source. For example, the method might be private. |
TargetInvocationException | The "remove" method throws an exception. |
ArgumentException | handler is not the same type as the event handler delegate used in conjunction with the event reflected by this instance. |
The RemoveEventHandler method will attempt to remove thate delegate that may sync this event on the the target object.
When an event is raised by target, the method(s) encapsulated by handler will no longer be invoked.
EventInfo Class | EventInfo Members | System.Reflection Namespace | Object | Delegate | EventHandler