EventRegistrationToken Structure

EventRegistrationToken Structure

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

A token that is returned when an event handler is added to a Windows Runtime event. The token is used to remove the event handler from the event at a later time.

Namespace:  System.Runtime.InteropServices.WindowsRuntime
Assembly:  mscorlib (in mscorlib.dll)

No code example is currently available or this language may not be supported.

The EventRegistrationToken type exposes the following members.

  NameDescription
Public methodEqualsReturns a value that indicates whether the current object is equal to the specified object. (Overrides ValueType::Equals(Object).)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeReturns the hash code for this instance. (Overrides ValueType::GetHashCode().)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns the fully qualified type name of this instance. (Inherited from ValueType.)
Top

  NameDescription
Public operatorStatic memberEqualityIndicates whether two EventRegistrationToken instances are equal.
Public operatorStatic memberInequalityIndicates whether two EventRegistrationToken instances are not equal.
Top

Use the EventRegistrationToken structure only if you use native Windows Runtime techniques to add and remove event handlers for Windows Runtime events. If you use the syntax that is provided by the C# or Visual Basic languages to add and remove event handlers, EventRegistrationToken is an implementation detail handled by the compilers.

Windows Phone OS

Supported in: 8.1, 8.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Show:
© 2017 Microsoft