FileNotFoundException
Class
Definition
The exception that is thrown when an attempt to access a file that does not exist on disk fails.
[System.Runtime.InteropServices.ComVisible(true)]
public class FileNotFoundException : System.IO.IOException
- Inheritance
- Attributes
Inherited Members
System.Exception
System.Object
Remarks
FileNotFoundException uses the HRESULT COR_E_FILENOTFOUND which has the value 0x80070002.
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.
Constructors
| FileNotFoundException() |
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. |
| FileNotFoundException(String) |
Initializes a new instance of the FileNotFoundException class with its message string set to |
| FileNotFoundException(SerializationInfo, StreamingContext) |
Initializes a new instance of the FileNotFoundException class with the specified serialization and context information. |
| FileNotFoundException(String, Exception) |
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) |
Initializes a new instance of the FileNotFoundException class with its message string set to |
| FileNotFoundException(String, String, Exception) |
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. |
Properties
| FileName |
Gets the name of the file that cannot be found. |
| FusionLog |
Gets the log file that describes why loading of an assembly failed. |
| Message |
Gets the error message that explains the reason for the exception. |
Methods
| GetObjectData(SerializationInfo, StreamingContext) |
Sets the SerializationInfo object with the file name and additional exception information. |
| ToString() |
Returns the fully qualified name of this exception and possibly the error message, the name of the inner exception, and the stack trace. |