Compartilhar via


InvalidPowerShellStateException Constructors

Definition

Overloads

InvalidPowerShellStateException()

Creates a new instance of InvalidPowershellStateException class.

InvalidPowerShellStateException(String)

Creates a new instance of InvalidPowershellStateException class.

InvalidPowerShellStateException(SerializationInfo, StreamingContext)
Obsolete.

Initializes a new instance of the InvalidPowerShellStateException class with serialized data.

InvalidPowerShellStateException(String, Exception)

Creates a new instance of InvalidPowershellStateException class.

InvalidPowerShellStateException()

Creates a new instance of InvalidPowershellStateException class.

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

Applies to

InvalidPowerShellStateException(String)

Creates a new instance of InvalidPowershellStateException class.

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

Parameters

message
String

The error message that explains the reason for the exception.

Applies to

InvalidPowerShellStateException(SerializationInfo, StreamingContext)

Caution

Legacy serialization support is deprecated since .NET 8

Initializes a new instance of the InvalidPowerShellStateException class with serialized data.

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

Parameters

info
SerializationInfo

The SerializationInfo that holds the serialized object data about the exception being thrown.

context
StreamingContext

The StreamingContext that contains contextual information about the source or destination.

Attributes

Applies to

InvalidPowerShellStateException(String, Exception)

Creates a new instance of InvalidPowershellStateException class.

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

Parameters

message
String

The error message that explains the reason for the exception.

innerException
Exception

The exception that is the cause of the current exception.

Applies to