CommandNotFoundException Constructors

Definition

Overloads

CommandNotFoundException()

Constructs a CommandNotFoundException.

CommandNotFoundException(String)

Constructs a CommandNotFoundException.

CommandNotFoundException(SerializationInfo, StreamingContext)
Obsolete.

Serialization constructor for class CommandNotFoundException.

CommandNotFoundException(String, Exception)

Constructs a CommandNotFoundException.

CommandNotFoundException()

Constructs a CommandNotFoundException.

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

Applies to

CommandNotFoundException(String)

Constructs a CommandNotFoundException.

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

Parameters

message
String

The message used in the exception.

Applies to

CommandNotFoundException(SerializationInfo, StreamingContext)

Caution

Legacy serialization support is deprecated since .NET 8

Serialization constructor for class CommandNotFoundException.

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

Parameters

info
SerializationInfo

serialization information

context
StreamingContext

streaming context

Attributes

Applies to

CommandNotFoundException(String, Exception)

Constructs a CommandNotFoundException.

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

Parameters

message
String

The message used in the exception.

innerException
Exception

An exception that led to this exception.

Applies to