Share via


FileNotFoundException.Message プロパティ

例外の原因を説明するエラー メッセージを取得します。

Overrides Public ReadOnly Property Message As String
[C#]
public override string Message {get;}
[C++]
public: __property String* get_Message();
[JScript]
public override function get Message() : String;

プロパティ値

エラー メッセージを含む文字列。

解説

現在の例外のコンストラクタにメッセージが渡されなかった場合、このプロパティはシステム提供のエラー メッセージを返します。 FileName プロパティが null 参照 (Visual Basic では Nothing) でない場合は、メッセージにファイル名が含まれます。

このプロパティは読み取り専用です。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ, .NET Compact Framework - Windows CE .NET, Common Language Infrastructure (CLI) Standard

参照

FileNotFoundException クラス | FileNotFoundException メンバ | System.IO 名前空間 | 入出力操作 | ファイルからのテキストの読み取り | ファイルへのテキストの書き込み