class FileNotFoundException

in global :: System . IO

The exception that is thrown when an attempt to access a file that does not exist on disk fails.


public FileNotFoundException( string message )

Initializes a new instance of the class with a specified error message.

  • message A description of the error. The content of is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

public FileNotFoundException( string message, Exception innerException )

Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception.

  • message A description of the error. The content of is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
  • innerException The exception that is the cause of the current exception. If the parameter is not , the current exception is raised in a block that handles the inner exception.

public FileNotFoundException( string message, string fileName )

Initializes a new instance of the class with a specified error message, and the file name that cannot be found.

  • message A description of the error, or to use a system-supplied message with the given . The content of should be understood by humans. The caller of this constructor must ensure that this string has been localized for the current system culture.
  • fileName The full name of the file with the invalid image.

public FileNotFoundException( string message, string fileName, Exception innerException )

Initializes a new instance of the class with a specified error message, the file name that cannot be found, and a reference to the inner exception that is the cause of this exception.

  • message The error message that explains the reason for the exception.
  • fileName The full name of the file with the invalid image.
  • innerException The exception that is the cause of the current exception. If the parameter is not , the current exception is raised in a block that handles the inner exception.

public string FileName { get; }

Gets the name of the file that cannot be found.

  • Returns The name of the file, or if no file name was passed to the constructor for this instance.

public string FusionLog { get; }

Gets the log file that describes why loading of an assembly failed.

  • Returns The errors reported by the assembly cache.

public void GetObjectData( SerializationInfo info, StreamingContext context )

Sets the object with the file name and additional exception information.

  • info The object that holds the serialized object data about the exception being thrown.
  • context The object that contains contextual information about the source or destination.

public string Message { get; }

Gets the error message that explains the reason for the exception.

  • Returns The error message.

😔 No documentation found.

public string Source { get; set; }

😔 No documentation found.

public Exception GetBaseException( )

😔 No documentation found.

public Type GetType( )

😔 No documentation found.

public string StackTrace { get; }

😔 No documentation found.

public Type GetType( )

😔 No documentation found.

public bool Equals( object obj )

😔 No documentation found.

public int GetHashCode( )

😔 No documentation found.

public FileNotFoundException( )

😔 No documentation found.

public IDictionary Data { get; }

😔 No documentation found.

public string ToString( )

😔 No documentation found.

public Exception InnerException { get; }

😔 No documentation found.

public int HResult { get; set; }

😔 No documentation found.