FileFormatException.FileFormatException(Uri, String) Constructor

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

Namespace: System.IO
Assembly: WindowsBase (in windowsbase.dll)

public FileFormatException (
	Uri sourceUri,
	string message
public FileFormatException (
	Uri sourceUri, 
	String message
public function FileFormatException (
	sourceUri : Uri, 
	message : String
You cannot use constructors in XAML.



The Uri value of the file that caused this error.


A String value that represents the error message.

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.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0