CmdletInvocationException Constructors

Definition

Overloads

CmdletInvocationException()

Instantiates a new instance of the CmdletInvocationException class.

CmdletInvocationException(String)

Instantiates a new instance of the CmdletInvocationException class.

CmdletInvocationException(SerializationInfo, StreamingContext)
Obsolete.

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

CmdletInvocationException(String, Exception)

Instantiates a new instance of the CmdletInvocationException class.

CmdletInvocationException()

Instantiates a new instance of the CmdletInvocationException class.

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

Applies to

CmdletInvocationException(String)

Instantiates a new instance of the CmdletInvocationException class.

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

Parameters

message
String

Applies to

CmdletInvocationException(SerializationInfo, StreamingContext)

Caution

Legacy serialization support is deprecated since .NET 8

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

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

Parameters

info
SerializationInfo

Serialization information.

context
StreamingContext

Streaming context.

Attributes

Applies to

CmdletInvocationException(String, Exception)

Instantiates a new instance of the CmdletInvocationException class.

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

Parameters

message
String
innerException
Exception

Applies to