Condividi tramite


PSArgumentOutOfRangeException Constructors

Definition

Overloads

PSArgumentOutOfRangeException()

Constructor for class PSArgumentOutOfRangeException.

PSArgumentOutOfRangeException(String)

Initializes a new instance of the PSArgumentOutOfRangeException class.

PSArgumentOutOfRangeException(SerializationInfo, StreamingContext)
Obsolete.

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

PSArgumentOutOfRangeException(String, Exception)

Initializes a new instance of the PSArgumentOutOfRangeException class.

PSArgumentOutOfRangeException(String, Object, String)

Initializes a new instance of the PSArgumentOutOfRangeException class.

PSArgumentOutOfRangeException()

Constructor for class PSArgumentOutOfRangeException.

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

Applies to

PSArgumentOutOfRangeException(String)

Initializes a new instance of the PSArgumentOutOfRangeException class.

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

Parameters

paramName
String

Remarks

Per MSDN, the parameter is paramName and not message. I confirm this experimentally as well.

Applies to

PSArgumentOutOfRangeException(SerializationInfo, StreamingContext)

Caution

Legacy serialization support is deprecated since .NET 8

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

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

Parameters

info
SerializationInfo

Serialization information.

context
StreamingContext

Streaming context.

Attributes

Applies to

PSArgumentOutOfRangeException(String, Exception)

Initializes a new instance of the PSArgumentOutOfRangeException class.

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

Parameters

message
String
innerException
Exception

Applies to

PSArgumentOutOfRangeException(String, Object, String)

Initializes a new instance of the PSArgumentOutOfRangeException class.

public:
 PSArgumentOutOfRangeException(System::String ^ paramName, System::Object ^ actualValue, System::String ^ message);
public:
 PSArgumentOutOfRangeException(Platform::String ^ paramName, Platform::Object ^ actualValue, Platform::String ^ message);
 PSArgumentOutOfRangeException(std::wstring const & paramName, winrt::Windows::Foundation::IInspectable const & actualValue, std::wstring const & message);
public PSArgumentOutOfRangeException (string paramName, object actualValue, string message);
new System.Management.Automation.PSArgumentOutOfRangeException : string * obj * string -> System.Management.Automation.PSArgumentOutOfRangeException
Public Sub New (paramName As String, actualValue As Object, message As String)

Parameters

paramName
String
actualValue
Object
message
String

Remarks

ArgumentOutOfRangeException has this ctor form and we imitate it here.

Applies to