FileNotFoundException クラス
定義
ディスク上に存在しないファイルにアクセスしようとして失敗したときにスローされる例外。The exception that is thrown when an attempt to access a file that does not exist on disk fails.
public ref class FileNotFoundException : System::IO::IOException
public class FileNotFoundException : System.IO.IOException
[System.Serializable]
public class FileNotFoundException : System.IO.IOException
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public class FileNotFoundException : System.IO.IOException
type FileNotFoundException = class
inherit IOException
[<System.Serializable>]
type FileNotFoundException = class
inherit IOException
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type FileNotFoundException = class
inherit IOException
Public Class FileNotFoundException
Inherits IOException
- 継承
- 継承
- 属性
注釈
FileNotFoundException
0x80070002 値を持つ HRESULT COR_E_FILENOTFOUND を使用します。FileNotFoundException
uses the HRESULT COR_E_FILENOTFOUND which has the value 0x80070002.
コードにアクセス許可がない場合 PathDiscovery 、この例外のエラーメッセージには、完全修飾パスではなく、ファイル名またはディレクトリ名のみを含めることができます。If your code does not have PathDiscovery permission, the error message for this exception may only contain file or directory names instead of fully qualified paths.
コンストラクター
FileNotFoundException() |
メッセージ文字列をシステム提供のメッセージに設定して、FileNotFoundException クラスの新しいインスタンスを初期化します。Initializes a new instance of the FileNotFoundException class with its message string set to a system-supplied message. |
FileNotFoundException(SerializationInfo, StreamingContext) |
指定したシリアル化とコンテキスト情報を使用して、FileNotFoundException クラスの新しいインスタンスを初期化します。Initializes a new instance of the FileNotFoundException class with the specified serialization and context information. |
FileNotFoundException(String) |
指定したエラー メッセージを使用して、FileNotFoundException クラスの新しいインスタンスを初期化します。Initializes a new instance of the FileNotFoundException class with a specified error message. |
FileNotFoundException(String, Exception) |
指定したエラー メッセージおよびこの例外の原因となった内部例外への参照を使用して、FileNotFoundException クラスの新しいインスタンスを初期化します。Initializes a new instance of the FileNotFoundException class with a specified error message and a reference to the inner exception that is the cause of this exception. |
FileNotFoundException(String, String) |
指定したエラー メッセージと見つからないファイル名を使用して、FileNotFoundException クラスの新しいインスタンスを初期化します。Initializes a new instance of the FileNotFoundException class with a specified error message, and the file name that cannot be found. |
FileNotFoundException(String, String, Exception) |
指定したエラー メッセージ、見つからないファイル名、およびこの例外の原因である内部例外への参照を使用して、FileNotFoundException クラスの新しいインスタンスを初期化します。Initializes a new instance of the FileNotFoundException class with a specified error message, the file name that cannot be found, and a reference to the inner exception that is the cause of this exception. |
プロパティ
Data |
例外に関する追加のユーザー定義情報を提供する、キーと値のペアのコレクションを取得します。Gets a collection of key/value pairs that provide additional user-defined information about the exception. (継承元 Exception) |
FileName |
見つからないファイルの名前を取得します。Gets the name of the file that cannot be found. |
FusionLog |
アセンブリの読み込みに失敗した原因を説明するログ ファイルを取得します。Gets the log file that describes why loading of an assembly failed. |
HelpLink |
この例外に関連付けられているヘルプ ファイルへのリンクを取得または設定します。Gets or sets a link to the help file associated with this exception. (継承元 Exception) |
HResult |
特定の例外に割り当てられているコード化数値である HRESULT を取得または設定します。Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (継承元 Exception) |
InnerException |
現在の例外の原因となる Exception インスタンスを取得します。Gets the Exception instance that caused the current exception. (継承元 Exception) |
Message |
例外の原因を説明するエラー メッセージを取得します。Gets the error message that explains the reason for the exception. |
Source |
エラーの原因となるアプリケーションまたはオブジェクトの名前を取得または設定します。Gets or sets the name of the application or the object that causes the error. (継承元 Exception) |
StackTrace |
呼び出し履歴で直前のフレームの文字列形式を取得します。Gets a string representation of the immediate frames on the call stack. (継承元 Exception) |
TargetSite |
現在の例外がスローされたメソッドを取得します。Gets the method that throws the current exception. (継承元 Exception) |
メソッド
Equals(Object) |
指定されたオブジェクトが現在のオブジェクトと等しいかどうかを判断します。Determines whether the specified object is equal to the current object. (継承元 Object) |
GetBaseException() |
派生クラスでオーバーライドされた場合、それ以後に発生する 1 つ以上の例外の根本原因である Exception を返します。When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions. (継承元 Exception) |
GetHashCode() |
既定のハッシュ関数として機能します。Serves as the default hash function. (継承元 Object) |
GetObjectData(SerializationInfo, StreamingContext) |
ファイル名と追加の例外情報を使用して SerializationInfo オブジェクトを設定します。Sets the SerializationInfo object with the file name and additional exception information. |
GetObjectData(SerializationInfo, StreamingContext) |
派生クラスでオーバーライドされた場合は、その例外に関する情報を使用して SerializationInfo を設定します。When overridden in a derived class, sets the SerializationInfo with information about the exception. (継承元 Exception) |
GetType() |
現在のインスタンスのランタイム型を取得します。Gets the runtime type of the current instance. (継承元 Exception) |
MemberwiseClone() |
現在の Object の簡易コピーを作成します。Creates a shallow copy of the current Object. (継承元 Object) |
ToString() |
この例外の絶対限定名と、場合によってはエラー メッセージ、内部例外の名前、スタック トレースなどを返します。Returns the fully qualified name of this exception and possibly the error message, the name of the inner exception, and the stack trace. |
イベント
SerializeObjectState |
例外がシリアル化され、例外に関するシリアル化されたデータを含む例外状態オブジェクトが作成されたときに発生します。Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception. (継承元 Exception) |