FileFormatException FileFormatException FileFormatException FileFormatException Constructors

Definition

Overloads

FileFormatException() FileFormatException() FileFormatException()

Creates a new instance of the FileFormatException class.

FileFormatException(String) FileFormatException(String) FileFormatException(String) FileFormatException(String)

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

FileFormatException(Uri) FileFormatException(Uri) FileFormatException(Uri) FileFormatException(Uri)

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

FileFormatException(SerializationInfo, StreamingContext) FileFormatException(SerializationInfo, StreamingContext) FileFormatException(SerializationInfo, StreamingContext) FileFormatException(SerializationInfo, StreamingContext)

Creates a new instance of the FileFormatException class and initializes it with serialized data. This constructor is called during deserialization to reconstitute the exception object transmitted over a stream.

FileFormatException(String, Exception) FileFormatException(String, Exception) FileFormatException(String, Exception) FileFormatException(String, Exception)

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

FileFormatException(Uri, Exception) FileFormatException(Uri, Exception) FileFormatException(Uri, Exception) FileFormatException(Uri, Exception)

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

FileFormatException(Uri, String) FileFormatException(Uri, String) FileFormatException(Uri, String) FileFormatException(Uri, String)

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

FileFormatException(Uri, String, Exception) FileFormatException(Uri, String, Exception) FileFormatException(Uri, String, Exception) 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.

FileFormatException() FileFormatException() FileFormatException()

Creates a new instance of the FileFormatException class.

public:
 FileFormatException();
public FileFormatException ();
Public Sub New ()

Remarks

This constructor uses a default system message that describes the error, such as "An input file or a data stream does not conform to the expected file format specification." This message takes into account the current system culture.

FileFormatException(String) FileFormatException(String) FileFormatException(String) FileFormatException(String)

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

public:
 FileFormatException(System::String ^ message);
public FileFormatException (string message);
new System.IO.FileFormatException : string -> System.IO.FileFormatException
Public Sub New (message As String)
Parameters
message
String String String String

A String value that represents the error message.

FileFormatException(Uri) FileFormatException(Uri) FileFormatException(Uri) FileFormatException(Uri)

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

public:
 FileFormatException(Uri ^ sourceUri);
public FileFormatException (Uri sourceUri);
new System.IO.FileFormatException : Uri -> System.IO.FileFormatException
Public Sub New (sourceUri As Uri)
Parameters
sourceUri
Uri Uri Uri Uri

The Uri value of the file that caused this error.

Remarks

This constructor initializes the Message property of the new FileFormatException instance to a system-supplied message that describes the error and includes the file name, such as "The file 'sourceUri' does not conform to the expected file format specification." This message takes into account the current system culture.

The SourceUri property is initialized using the sourceUri parameter.

FileFormatException(SerializationInfo, StreamingContext) FileFormatException(SerializationInfo, StreamingContext) FileFormatException(SerializationInfo, StreamingContext) FileFormatException(SerializationInfo, StreamingContext)

Creates a new instance of the FileFormatException class and initializes it with serialized data. This constructor is called during deserialization to reconstitute the exception object transmitted over a stream.

protected:
 FileFormatException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected FileFormatException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.IO.FileFormatException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.IO.FileFormatException
Protected Sub New (info As SerializationInfo, context As StreamingContext)
Parameters
info
SerializationInfo SerializationInfo SerializationInfo SerializationInfo

The object that holds the serialized object data.

context
StreamingContext StreamingContext StreamingContext StreamingContext

The contextual information about the source or destination.

FileFormatException(String, Exception) FileFormatException(String, Exception) FileFormatException(String, Exception) FileFormatException(String, Exception)

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

public:
 FileFormatException(System::String ^ message, Exception ^ innerException);
public FileFormatException (string message, Exception innerException);
new System.IO.FileFormatException : string * Exception -> System.IO.FileFormatException
Public Sub New (message As String, innerException As Exception)
Parameters
message
String String String String

A String value that represents the error message.

innerException
Exception Exception Exception Exception

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

Remarks

This constructor initializes the Message property of the new FileFormatException instance with the specified error message represented by message.

FileFormatException(Uri, Exception) FileFormatException(Uri, Exception) FileFormatException(Uri, Exception) 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);
public FileFormatException (Uri sourceUri, Exception innerException);
new System.IO.FileFormatException : Uri * Exception -> System.IO.FileFormatException
Public Sub New (sourceUri As Uri, innerException As Exception)
Parameters
sourceUri
Uri Uri Uri Uri

The Uri value of the file that caused this error.

innerException
Exception Exception Exception Exception

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

Remarks

This constructor initializes the Message property of the new instance to a system-supplied message that describes the error and includes the file name, such as "The file 'sourceUri' does not conform to the expected file format specification." This message takes into account the current system culture.

The SourceUri property is initialized using the sourceUri parameter.

FileFormatException(Uri, String) FileFormatException(Uri, String) FileFormatException(Uri, String) 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, System::String ^ message);
public FileFormatException (Uri sourceUri, string message);
new System.IO.FileFormatException : Uri * string -> System.IO.FileFormatException
Public Sub New (sourceUri As Uri, message As String)
Parameters
sourceUri
Uri Uri Uri Uri

The Uri value of the file that caused this error.

message
String String String String

A String value that represents the error message.

Remarks

This constructor initializes the Message property of the new FileFormatException instance with the specified error message represented by message. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

The SourceUri property is initialized using the sourceUri parameter.

FileFormatException(Uri, String, Exception) FileFormatException(Uri, String, Exception) FileFormatException(Uri, String, Exception) 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, System::String ^ message, Exception ^ innerException);
public FileFormatException (Uri sourceUri, string message, Exception innerException);
new System.IO.FileFormatException : Uri * string * Exception -> System.IO.FileFormatException
Public Sub New (sourceUri As Uri, message As String, innerException As Exception)
Parameters
sourceUri
Uri Uri Uri Uri

The Uri value of the file that caused this error.

message
String String String String

A String value that represents the error message.

innerException
Exception Exception Exception Exception

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

Remarks

This constructor initializes the Message property of the new instance using the message parameter. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

The SourceUri property is initialized using the sourceUri parameter.

Applies to