Edit

Share via


EventRegistrationTokenTable<T>.AddEventHandler(T) Method

Definition

Adds the specified event handler to the table and to the invocation list, and returns a token that can be used to remove the event handler.

public:
 System::Runtime::InteropServices::WindowsRuntime::EventRegistrationToken AddEventHandler(T handler);
public System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken AddEventHandler (T handler);
public System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken AddEventHandler (T? handler);
member this.AddEventHandler : 'T -> System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken
Public Function AddEventHandler (handler As T) As EventRegistrationToken

Parameters

handler
T

The event handler to add.

Returns

A token that can be used to remove the event handler from the table and the invocation list.

Applies to