WindowsRuntimeMarshal.RemoveEventHandler<T>(Action<EventRegistrationToken>, T) 方法
定义
从 Windows 运行时事件中移除指定的事件处理程序。Removes the specified event handler from a Windows Runtime event.
此 API 支持产品基础结构,不能在代码中直接使用。
public:
generic <typename T>
static void RemoveEventHandler(Action<System::Runtime::InteropServices::WindowsRuntime::EventRegistrationToken> ^ removeMethod, T handler);
[System.Security.SecurityCritical]
public static void RemoveEventHandler<T> (Action<System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken> removeMethod, T handler);
public static void RemoveEventHandler<T> (Action<System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken> removeMethod, T handler);
[<System.Security.SecurityCritical>]
static member RemoveEventHandler : Action<System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken> * 'T -> unit
static member RemoveEventHandler : Action<System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken> * 'T -> unit
Public Shared Sub RemoveEventHandler(Of T) (removeMethod As Action(Of EventRegistrationToken), handler As T)
类型参数
- T
代表事件处理程序委托的类型。The type of the delegate that represents the event handler.
参数
- removeMethod
- Action<EventRegistrationToken>
委托,表示从 Windows 运行时事件中移除事件处理程序的方法。A delegate that represents the method that removes event handlers from the Windows Runtime event.
- handler
- T
要移除的事件处理程序。The event handler that is removed.
- 属性
例外
removeMethod 为 null。removeMethod is null.