Bearbeiten

Freigeben über


WindowsRuntimeMarshal.RemoveEventHandler<T> Method

Definition

Removes the specified event handler from a Windows Runtime event.

This API supports the product infrastructure and is not intended to be used directly from your code.

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)

Type Parameters

T

The type of the delegate that represents the event handler.

Parameters

removeMethod
Action<EventRegistrationToken>

A delegate that represents the method that removes event handlers from the Windows Runtime event.

handler
T

The event handler that is removed.

Attributes

Exceptions

removeMethod is null.

Applies to