NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

EventInfo.RemoveEventHandler

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
);

Parameters

target
The event source.
handler
Encapsulates one or more methods to be invoked when the event is raised by the target.

Exceptions

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.

Remarks

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.

See Also

EventInfo Class | EventInfo Members | System.Reflection Namespace | Object | Delegate | EventHandler