VirtualTypeImplementor.RemoveEventHandler Method
Removes the given delegate from the given event.
Namespace: Microsoft.VisualStudio.Shell.Design
Assembly: Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)
Syntax
'宣告
Public Overridable Sub RemoveEventHandler ( _
eventInfo As EventInfo, _
instance As Object, _
handler As Delegate _
)
public virtual void RemoveEventHandler(
EventInfo eventInfo,
Object instance,
Delegate handler
)
Parameters
- eventInfo
Type: System.Reflection.EventInfo
The event to remove the handler from.
- instance
Type: System.Object
The instance on which to remove the event handler. This may be nulla null reference (Nothing in Visual Basic) if the event is static.
- handler
Type: System.Delegate
The event handler to remove.
Exceptions
Exception | Condition |
---|---|
NotImplementedException | If non-abstract derived class did not provide an implementation by overriding this method. |
Remarks
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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.