Exception クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
アプリケーションの実行中に発生したエラーを表します。
public ref class Exception
public ref class Exception : System::Runtime::Serialization::ISerializable
public ref class Exception : System::Runtime::InteropServices::_Exception, System::Runtime::Serialization::ISerializable
public class Exception
public class Exception : System.Runtime.Serialization.ISerializable
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDual)]
[System.Serializable]
public class Exception : System.Runtime.Serialization.ISerializable
[System.Serializable]
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)]
[System.Runtime.InteropServices.ComVisible(true)]
public class Exception : System.Runtime.InteropServices._Exception, System.Runtime.Serialization.ISerializable
type Exception = class
type Exception = class
interface ISerializable
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDual)>]
[<System.Serializable>]
type Exception = class
interface ISerializable
[<System.Serializable>]
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type Exception = class
interface ISerializable
interface _Exception
Public Class Exception
Public Class Exception
Implements ISerializable
Public Class Exception
Implements _Exception, ISerializable
- 継承
-
Exception
- 派生
- 属性
- 実装
注釈
この API の詳細については、「例外に関 する補足 API 解説」を参照してください。
コンストラクター
| 名前 | 説明 |
|---|---|
| Exception() |
Exception クラスの新しいインスタンスを初期化します。 |
| Exception(SerializationInfo, StreamingContext) |
古い.
シリアル化されたデータを使用して、 Exception クラスの新しいインスタンスを初期化します。 |
| Exception(String, Exception) |
指定したエラー メッセージと、この例外の原因である内部例外への参照を使用して、 Exception クラスの新しいインスタンスを初期化します。 |
| Exception(String) |
指定したエラー メッセージを使用して、 Exception クラスの新しいインスタンスを初期化します。 |
プロパティ
| 名前 | 説明 |
|---|---|
| Data |
例外に関する追加のユーザー定義情報を提供するキーと値のペアのコレクションを取得します。 |
| HelpLink |
この例外に関連付けられているヘルプ ファイルへのリンクを取得または設定します。 |
| HResult |
特定の例外に割り当てられるコード化された数値である HRESULT を取得または設定します。 |
| InnerException |
現在の例外の原因となった Exception インスタンスを取得します。 |
| Message |
現在の例外を説明するメッセージを取得します。 |
| Source |
エラーの原因となるアプリケーションまたはオブジェクトの名前を取得または設定します。 |
| StackTrace |
呼び出し履歴のイミディエイト フレームの文字列表現を取得します。 |
| TargetSite |
現在の例外をスローするメソッドを取得します。 |
メソッド
| 名前 | 説明 |
|---|---|
| Equals(Object) |
指定したオブジェクトが現在のオブジェクトと等しいかどうかを判断します。 (継承元 Object) |
| GetBaseException() |
派生クラスでオーバーライドされた場合、1 つ以上の後続の例外の根本原因である Exception を返します。 |
| GetHashCode() |
既定のハッシュ関数として機能します。 (継承元 Object) |
| GetObjectData(SerializationInfo, StreamingContext) |
古い.
派生クラスでオーバーライドされた場合は、例外に関する情報を使用して SerializationInfo を設定します。 |
| GetType() |
現在のインスタンスのランタイム型を取得します。 |
| GetType() |
現在のインスタンスの Type を取得します。 (継承元 Object) |
| MemberwiseClone() |
現在の Objectの簡易コピーを作成します。 (継承元 Object) |
| ToString() |
現在の例外の文字列形式を作成して返します。 |
イベント
| 名前 | 説明 |
|---|---|
| SerializeObjectState |
古い.
例外に関するシリアル化されたデータを含む例外状態オブジェクトを作成するために例外がシリアル化されるときに発生します。 |