UnhandledExceptionEventHandler 代理人
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
表示將處理例外狀況所引發之事件的方法,而該例外狀況不是由應用程式定義域處理。
public delegate void UnhandledExceptionEventHandler(System::Object ^ sender, UnhandledExceptionEventArgs ^ e);
C#
public delegate void UnhandledExceptionEventHandler(object sender, UnhandledExceptionEventArgs e);
C#
[System.Serializable]
public delegate void UnhandledExceptionEventHandler(object sender, UnhandledExceptionEventArgs e);
C#
[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只能針對系統所建立的預設應用程式域指定 ,以執行應用程式。 為 UnhandledExceptionEventHandler 應用程式所建立的 AppDomain 指定 沒有作用。
當您建立 UnhandledExceptionEventHandler 委派 (Delegate) 時,就可以識別即將處理此事件的方法。 若要將事件處理常式與您的事件產生關聯,請將委派的實例新增至 事件。 除非您移除委派,否則每當事件發生時就會呼叫事件處理常式。 如需事件處理常式委派的詳細資訊,請參閱 處理和引發事件。
Get |
取得表示特定委派所代表之方法的物件。 |
產品 | 版本 |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 |
.NET Standard | 2.0, 2.1 |