다음을 통해 공유


SessionStateException Constructors

Definition

Overloads

SessionStateException()

Constructs a SessionStateException.

SessionStateException(String)

Constructs a SessionStateException.

SessionStateException(SerializationInfo, StreamingContext)
Obsolete.

Constructs a SessionStateException using serialized data.

SessionStateException(String, Exception)

Constructs a SessionStateException.

SessionStateException()

Constructs a SessionStateException.

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

Applies to

SessionStateException(String)

Constructs a SessionStateException.

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

Parameters

message
String

The message used in the exception.

Applies to

SessionStateException(SerializationInfo, StreamingContext)

Caution

Legacy serialization support is deprecated since .NET 8

Constructs a SessionStateException using serialized data.

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

Parameters

info
SerializationInfo

Serialization information.

context
StreamingContext

Streaming context.

Attributes

Applies to

SessionStateException(String, Exception)

Constructs a SessionStateException.

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

Parameters

message
String

The message used in the exception.

innerException
Exception

The exception that caused the error.

Applies to