EventRegistrationToken EventRegistrationToken EventRegistrationToken EventRegistrationToken Struct

Represents a reference to a delegate that receives change notifications.

.NET When programming with .NET, this type is hidden. Advanced-scenario developers should use System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken.

Syntax

Declaration

public struct EventRegistrationTokenpublic struct EventRegistrationTokenPublic Structure EventRegistrationTokenpublic struct EventRegistrationToken

Remarks

When programming with .NET, this type is hidden and developers that need an event registration token for advanced event scenarios should use the System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken type. For most app code, you won't need EventRegistrationToken (or event registration tokens) at all, because the add/remove syntax for C# and Visual Basic languages enables the compiler to generate the registration tokens from a simpler syntax.

In the event subscription model, a delegate registers to receive change notifications from a specified object such as a collection. The EventRegistrationToken is used to remove the delegate as a subscriber of change notifications when notifications are no longer needed.

Fields summary

The reference to the delegate. A valid reference will not have a value of zero.

Fields

  • Value
    Value
    Value
    Value

    The reference to the delegate. A valid reference will not have a value of zero.

    public field long Valuepublic field long ValuePublic Field Valuepublic field long Value

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.FoundationContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute

Details

Assembly

Windows.Foundation.dll