FileFormatException Class

The exception that is thrown when an input file or a data stream that is supposed to conform to a certain file format specification is malformed.

Syntax

Declaration

public class FileFormatException : FormatException, ISerializable, _Exception

Inheritance Hierarchy

Constructors summary

Creates a new instance of the FileFormatException class.

Creates a new instance of the FileFormatException class with a specified error message.

Creates a new instance of the FileFormatException class with a specified error message and exception type.

Creates a new instance of the FileFormatException class with a source URI value.

Creates a new instance of the FileFormatException class with a source URI value and an exception type.

Creates a new instance of the FileFormatException class with a source URI value and a specified error message.

Creates a new instance of the FileFormatException class with a source URI value, a specified error message, and an exception type.

Properties summary

Gets the name of a file that caused the FileFormatException.

Constructors

  • FileFormatException()

    Creates a new instance of the FileFormatException class.

    public FileFormatException()
  • FileFormatException(String)

    Creates a new instance of the FileFormatException class with a specified error message.

    public FileFormatException(string message)

    Parameters

    • message

      A String value that represents the error message.

  • FileFormatException(String, Exception)

    Creates a new instance of the FileFormatException class with a specified error message and exception type.

    public FileFormatException(string message, Exception innerException)

    Parameters

    • message

      A String value that represents the error message.

    • innerException

      The value of the InnerException property, which represents the cause of the current exception.

  • FileFormatException(Uri)

    Creates a new instance of the FileFormatException class with a source URI value.

    public FileFormatException(Uri sourceUri)

    Parameters

    • sourceUri

      The Uri value of the file that caused this error.

  • FileFormatException(Uri, Exception)

    Creates a new instance of the FileFormatException class with a source URI value and an exception type.

    public FileFormatException(Uri sourceUri, Exception innerException)

    Parameters

    • sourceUri

      The Uri value of the file that caused this error.

    • innerException

      The value of the InnerException property, which represents the cause of the current exception.

  • FileFormatException(Uri, String)

    Creates a new instance of the FileFormatException class with a source URI value and a specified error message.

    public FileFormatException(Uri sourceUri, string message)

    Parameters

    • sourceUri

      The Uri value of the file that caused this error.

    • message

      A String value that represents the error message.

  • FileFormatException(Uri, String, Exception)

    Creates a new instance of the FileFormatException class with a source URI value, a specified error message, and an exception type.

    public FileFormatException(Uri sourceUri, string message, Exception innerException)

    Parameters

    • sourceUri

      The Uri value of the file that caused this error.

    • message

      A String value that represents the error message.

    • innerException

      The value of the InnerException property, which represents the cause of the current exception.

Properties

  • SourceUri

    Gets the name of a file that caused the FileFormatException.

    public Uri SourceUri { get; }

    Property Value

    • A Uri that represents the name the file that caused the exception.

Details

Namespace

System.IO

Assembly

System.IO.Packaging.dll