Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

FileNotFoundException Constructor

.NET Framework 1.1

Initializes a new instance of the FileNotFoundException class with optional message string and inner Exception reference.

Overload List

Initializes a new instance of the FileNotFoundException class with its message string set to a system-supplied message and its HRESULT set to COR_E_FILENOTFOUND.

Supported by the .NET Compact Framework.

[Visual Basic] Public Sub New()
[C#] public FileNotFoundException();
[C++] public: FileNotFoundException();
[JScript] public function FileNotFoundException();

Initializes a new instance of the FileNotFoundException class with its message string set to message and its HRESULT set to COR_E_FILENOTFOUND.

Supported by the .NET Compact Framework.

[Visual Basic] Public Sub New(String)
[C#] public FileNotFoundException(string);
[C++] public: FileNotFoundException(String*);
[JScript] public function FileNotFoundException(String);

Initializes a new instance of the FileNotFoundException class with the specified serialization and context information.

[Visual Basic] Protected Sub New(SerializationInfo, StreamingContext)
[C#] protected FileNotFoundException(SerializationInfo, StreamingContext);
[C++] protected: FileNotFoundException(SerializationInfo*, StreamingContext);
[JScript] protected function FileNotFoundException(SerializationInfo, StreamingContext);

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.

[Visual Basic] Public Sub New(String, Exception)
[C#] public FileNotFoundException(string, Exception);
[C++] public: FileNotFoundException(String*, Exception*);
[JScript] public function FileNotFoundException(String, Exception);

Initializes a new instance of the FileNotFoundException class with its message string set to message, specifying the file name that cannot be found, and its HRESULT set to COR_E_FILENOTFOUND.

[Visual Basic] Public Sub New(String, String)
[C#] public FileNotFoundException(string, string);
[C++] public: FileNotFoundException(String*, String*);
[JScript] public function FileNotFoundException(String, String);

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.

[Visual Basic] Public Sub New(String, String, Exception)
[C#] public FileNotFoundException(string, string, Exception);
[C++] public: FileNotFoundException(String*, String*, Exception*);
[JScript] public function FileNotFoundException(String, String, Exception);

See Also

FileNotFoundException Class | FileNotFoundException Members | System.IO Namespace

Show:
© 2015 Microsoft