This documentation is archived and is not being maintained.

InvalidDataException.InvalidDataException(String) Constructor

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

Namespace: System.IO
Assembly: System (in system.dll)

public InvalidDataException (
	string message
)
public InvalidDataException (
	String message
)
public function InvalidDataException (
	message : String
)
Not applicable.

Parameters

message

The error message that explains the reason for the exception.

This constructor initializes the Message property of the new instance to a system-supplied message that describes the error, such as "An invalid argument was specified." This message is localized based on the current system culture.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, 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, 2.0
Show: