SessionEndedEventHandler 委托

定义

表示用来处理 SessionEnded 事件的方法。Represents the method that will handle the SessionEnded event.

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

参数

sender
Object

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

e
SessionEndedEventArgs

包含事件数据的 SessionEndedEventArgsA SessionEndedEventArgs that contains the event data.

继承
SessionEndedEventHandler

注解

创建 SessionEndedEventHandler 委托时,需要标识将处理该事件的方法。When you create a SessionEndedEventHandler 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.

适用于

另请参阅