SessionEndingEventHandler 委托

定义

表示将处理来自操作系统的 SessionEnding 事件的方法。Represents the method that will handle the SessionEnding event from the operating system.

public delegate void SessionEndingEventHandler(System::Object ^ sender, SessionEndingEventArgs ^ e);
public delegate void SessionEndingEventHandler(object sender, SessionEndingEventArgs e);
type SessionEndingEventHandler = delegate of obj * SessionEndingEventArgs -> unit
Public Delegate Sub SessionEndingEventHandler(sender As Object, e As SessionEndingEventArgs)

参数

sender
Object

事件源。The source of the event. SystemEvents 类引发此事件时,此对象总是为 nullWhen this event is raised by the SystemEvents class, this object is always null.

e
SessionEndingEventArgs

包含事件数据的 SessionEndingEventArgsA SessionEndingEventArgs that contains the event data.

继承
SessionEndingEventHandler

注解

创建 SessionEndingEventHandler 委托时,需要标识将处理该事件的方法。When you create a SessionEndingEventHandler delegate, you identify the method that will handle the event. 若要将事件与事件处理方法关联, 请将委托的实例添加到事件。To associate the event with your event-handling method, add an instance of the delegate to the event. 只要事件发生, 就会调用事件处理方法, 除非删除委托。The event-handling method is called whenever the event occurs, unless you remove the delegate. 有关事件处理程序委托的详细信息, 请参阅处理和引发事件For more information about event-handler delegates, see Handling and Raising Events.

扩展方法

GetMethodInfo(Delegate)

获取指示指定委托表示的方法的对象。Gets an object that represents the method represented by the specified delegate.

适用于

另请参阅