メッセージ文字列を message に設定し、見つからなかったファイル名を指定し、HRESULT を COR_E_FILENOTFOUND に設定して、FileNotFoundException クラスの新しいインスタンスを初期化します。
名前空間: System.IO
アセンブリ: mscorlib (mscorlib.dll 内)
構文
'宣言
Public Sub New ( _
message As String, _
fileName As String _
)
'使用
Dim message As String
Dim fileName As String
Dim instance As New FileNotFoundException(message, fileName)
public FileNotFoundException (
string message,
string fileName
)
public:
FileNotFoundException (
String^ message,
String^ fileName
)
public FileNotFoundException (
String message,
String fileName
)
public function FileNotFoundException (
message : String,
fileName : String
)
パラメータ
- message
エラーを説明する String。message の内容は、ユーザーが読むことを前提としています。このコンストラクタの呼び出し元は、この文字列が現在のシステムのカルチャに合わせてローカライズ済みであることを確認しておく必要があります。
- fileName
無効なイメージを含むファイルの完全名を含んでいる String。
解説
コンストラクタは、新しいインスタンスの Message プロパティを message を使用して初期化し、FileName プロパティを fileName を使用して初期化します。
プラットフォーム
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
.NET Framework
サポート対象 : 2.0、1.1、1.0
参照
関連項目
FileNotFoundException クラス
FileNotFoundException メンバ
System.IO 名前空間