英語で読む

次の方法で共有


UnhandledExceptionEventHandler 代理人

定義

アプリケーション ドメインで処理されない例外によって発生したイベントを処理するメソッドを表します。

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);

パラメーター

sender
Object

未処理の例外イベントのソース。

e
UnhandledExceptionEventArgs

イベント データを格納している UnhandledExceptionEventArgs

属性

注釈

UnhandledExceptionEventHandler 、アプリケーションを実行するためにシステムによって作成される既定のアプリケーション ドメインに対してのみ指定できます。 UnhandledExceptionEventHandlerアプリケーションによって作成された に 対して AppDomain を指定しても効果はありません。

UnhandledExceptionEventHandler デリゲートを作成する場合は、イベントを処理するメソッドを指定します。 イベント ハンドラーをイベントに関連付けるには、デリゲートのインスタンスを イベントに追加します。 イベント ハンドラーは、デリゲートを削除しない限り、イベントが発生するたびに呼び出されます。 イベント ハンドラー デリゲートの詳細については、「イベントの 処理と発生」を参照してください。

拡張メソッド

GetMethodInfo(Delegate)

指定したデリゲートによって表されるメソッドを表すオブジェクトを取得します。

適用対象

製品 バージョン
.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

こちらもご覧ください