EventInfoRemoveEventHandler Method |
Removes an event handler from an event source.
Namespace: System.ReflectionAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public virtual void RemoveEventHandler(
Object target,
Delegate handler
)
Parameters
- target
- Type: SystemObject
The event source. - handler
- Type: SystemDelegate
The delegate to be disassociated from the events raised by target.
Exceptions Exception | Condition |
---|
InvalidOperationException | The event does not have a public remove accessor. |
ArgumentException | The handler that was passed in cannot be used. |
TargetException | The target parameter is null and the event is not static.-or- The EventInfo is not declared on the target. |
MethodAccessException | The caller does not have access permission to the member. |
See Also