This documentation is archived and is not being maintained.

InvalidOperationException Constructor (String)

.NET Framework 1.1

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

[Visual Basic]
Public Sub New( _
   ByVal message As String _
)
[C#]
public InvalidOperationException(
   string message
);
[C++]
public: InvalidOperationException(
   String* message
);
[JScript]
public function InvalidOperationException(
   message : String
);

Parameters

message
The message that describes the error.

Remarks

This constructor initializes the Exception.Message property of the new exception using the message parameter. The content of message 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.

The following table shows the initial property values for an instance of InvalidOperationException.

Property Value
InnerException A null reference (Nothing in Visual Basic).
Message The error message string.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

InvalidOperationException Class | InvalidOperationException Members | System Namespace | InvalidOperationException Constructor Overload List

Show: