Bagikan melalui


PSInvalidOperationException Constructors

Definition

Overloads

PSInvalidOperationException()

Initializes a new instance of the PSInvalidOperationException class.

PSInvalidOperationException(String)

Initializes a new instance of the PSInvalidOperationException class.

PSInvalidOperationException(SerializationInfo, StreamingContext)
Obsolete.

Initializes a new instance of the PSInvalidOperationException class using data serialized via ISerializable

PSInvalidOperationException(String, Exception)

Initializes a new instance of the PSInvalidOperationException class.

PSInvalidOperationException()

Initializes a new instance of the PSInvalidOperationException class.

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

Applies to

PSInvalidOperationException(String)

Initializes a new instance of the PSInvalidOperationException class.

public:
 PSInvalidOperationException(System::String ^ message);
public:
 PSInvalidOperationException(Platform::String ^ message);
 PSInvalidOperationException(std::wstring const & message);
public PSInvalidOperationException (string message);
new System.Management.Automation.PSInvalidOperationException : string -> System.Management.Automation.PSInvalidOperationException
Public Sub New (message As String)

Parameters

message
String

Applies to

PSInvalidOperationException(SerializationInfo, StreamingContext)

Caution

Legacy serialization support is deprecated since .NET 8

Initializes a new instance of the PSInvalidOperationException class using data serialized via ISerializable

protected:
 PSInvalidOperationException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected PSInvalidOperationException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[System.Obsolete("Legacy serialization support is deprecated since .NET 8", DiagnosticId="SYSLIB0051")]
protected PSInvalidOperationException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Management.Automation.PSInvalidOperationException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Management.Automation.PSInvalidOperationException
[<System.Obsolete("Legacy serialization support is deprecated since .NET 8", DiagnosticId="SYSLIB0051")>]
new System.Management.Automation.PSInvalidOperationException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Management.Automation.PSInvalidOperationException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

Parameters

info
SerializationInfo

Serialization information.

context
StreamingContext

Streaming context.

Attributes

Applies to

PSInvalidOperationException(String, Exception)

Initializes a new instance of the PSInvalidOperationException class.

public:
 PSInvalidOperationException(System::String ^ message, Exception ^ innerException);
public PSInvalidOperationException (string message, Exception innerException);
new System.Management.Automation.PSInvalidOperationException : string * Exception -> System.Management.Automation.PSInvalidOperationException
Public Sub New (message As String, innerException As Exception)

Parameters

message
String
innerException
Exception

Applies to