SessionEndingEventArgs SessionEndingEventArgs SessionEndingEventArgs SessionEndingEventArgs Class


Provides data for the SessionEnding event.

public ref class SessionEndingEventArgs : EventArgs
public class SessionEndingEventArgs : EventArgs
type SessionEndingEventArgs = class
    inherit EventArgs
Public Class SessionEndingEventArgs
Inherits EventArgs


A SessionEnding event is raised when the user is trying to log off or shut the system down.

This SessionEnding event can sometimes be canceled. Setting the Cancel property of a SessionEndingEventArgs to false will request that the session continue instead of ending. Making such a request provides no guarantee that the session will not end.


SessionEndingEventArgs(SessionEndReasons) SessionEndingEventArgs(SessionEndReasons) SessionEndingEventArgs(SessionEndReasons) SessionEndingEventArgs(SessionEndReasons)

Initializes a new instance of the SessionEndingEventArgs class using the specified value indicating the type of session close event that is occurring.


Cancel Cancel Cancel Cancel

Gets or sets a value indicating whether to cancel the user request to end the session.

Reason Reason Reason Reason

Gets the reason the session is ending.


Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

See also