Delen via


MethodInvocationException Constructors

Definition

Overloads

MethodInvocationException()

Initializes a new instance of MethodInvocationException with the message set to typeof(MethodInvocationException).FullName.

MethodInvocationException(String)

Initializes a new instance of MethodInvocationException setting the message.

MethodInvocationException(SerializationInfo, StreamingContext)
Obsolete.

Initializes a new instance of MethodInvocationException with serialization parameters.

MethodInvocationException(String, Exception)

Initializes a new instance of MethodInvocationException setting the message and innerException.

MethodInvocationException()

Initializes a new instance of MethodInvocationException with the message set to typeof(MethodInvocationException).FullName.

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

Applies to

MethodInvocationException(String)

Initializes a new instance of MethodInvocationException setting the message.

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

Parameters

message
String

The exception's message.

Applies to

MethodInvocationException(SerializationInfo, StreamingContext)

Caution

Legacy serialization support is deprecated since .NET 8

Initializes a new instance of MethodInvocationException with serialization parameters.

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

Parameters

info
SerializationInfo

Serialization information.

context
StreamingContext

Streaming context.

Attributes

Applies to

MethodInvocationException(String, Exception)

Initializes a new instance of MethodInvocationException setting the message and innerException.

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

Parameters

message
String

The exception's message.

innerException
Exception

The exception's inner exception.

Applies to