Share via


ScriptRequiresException Constructors

Definition

Overloads

ScriptRequiresException()

Constructs an PSVersionNotCompatibleException.

ScriptRequiresException(String)

Constructs an PSVersionNotCompatibleException.

ScriptRequiresException(SerializationInfo, StreamingContext)
Obsolete.

Constructs an PSVersionNotCompatibleException using serialized data.

ScriptRequiresException(String, Exception)

Constructs an PSVersionNotCompatibleException.

ScriptRequiresException()

Constructs an PSVersionNotCompatibleException.

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

Applies to

ScriptRequiresException(String)

Constructs an PSVersionNotCompatibleException.

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

Parameters

message
String

The message used in the exception.

Applies to

ScriptRequiresException(SerializationInfo, StreamingContext)

Caution

Legacy serialization support is deprecated since .NET 8

Constructs an PSVersionNotCompatibleException using serialized data.

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

Parameters

info
SerializationInfo

serialization information

context
StreamingContext

streaming context

Attributes

Applies to

ScriptRequiresException(String, Exception)

Constructs an PSVersionNotCompatibleException.

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

Parameters

message
String

The message used in the exception.

innerException
Exception

The exception that led to this exception.

Applies to