UnhandledExceptionEventHandler 委托
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
表示将处理由应用程序域未处理的异常引发的事件的方法。
public delegate void UnhandledExceptionEventHandler(System::Object ^ sender, UnhandledExceptionEventArgs ^ e);
public delegate void UnhandledExceptionEventHandler(object sender, UnhandledExceptionEventArgs e);
[System.Serializable]
public delegate void UnhandledExceptionEventHandler(object sender, UnhandledExceptionEventArgs e);
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public delegate void UnhandledExceptionEventHandler(object sender, UnhandledExceptionEventArgs e);
type UnhandledExceptionEventHandler = delegate of obj * UnhandledExceptionEventArgs -> unit
[<System.Serializable>]
type UnhandledExceptionEventHandler = delegate of obj * UnhandledExceptionEventArgs -> unit
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type UnhandledExceptionEventHandler = delegate of obj * UnhandledExceptionEventArgs -> unit
Public Delegate Sub UnhandledExceptionEventHandler(sender As Object, e As UnhandledExceptionEventArgs)
参数
- sender
- Object
未经处理的异常事件的源。
包含事件数据的一个 UnhandledExceptionEventArgs 。
- 属性
注解
只能为系统创建的默认应用程序域指定一 UnhandledExceptionEventHandler 个执行应用程序。 为应用程序创建的指定无效UnhandledExceptionEventHandlerAppDomain。
创建 UnhandledExceptionEventHandler 委托时,可以标识将处理事件的方法。 若要将事件处理程序与事件相关联,请将委托的实例添加到事件。 除非删除委托,否则每当事件发生时调用事件处理程序。 有关事件处理程序委托的详细信息,请参阅 处理和引发事件。
扩展方法
| 名称 | 说明 |
|---|---|
| GetMethodInfo(Delegate) |
获取一个对象,该对象表示由指定委托表示的方法。 |