Click or drag to resize
FileNotFoundException Class
The exception that is thrown when an attempt to access a file that does not exist on disk fails.
Inheritance Hierarchy
SystemObject
  SystemException
    SystemSystemException
      System.IOIOException
        System.IOFileNotFoundException

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
[SerializableAttribute]
public class FileNotFoundException : IOException

The FileNotFoundException type exposes the following members.

Methods
  NameDescription
Public methodEquals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the runtime type of the current instance.
(Inherited from Exception.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns the fully qualified name of this exception and possibly the error message, the name of the inner exception, and the stack trace.
(Overrides ExceptionToString.)
Top
Properties
  NameDescription
Public propertyInnerException
Gets the Exception instance that caused the current exception.
(Inherited from Exception.)
Public propertyMessage
Gets a message that describes the current exception.
(Inherited from Exception.)
Public propertyStackTrace
Gets a string representation of the immediate frames on the call stack.
(Inherited from Exception.)
Top
Events
  NameDescription
Protected eventSerializeObjectState
Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception.
(Inherited from Exception.)
Top
See Also