Compartilhar via


MetadataException Constructors

Definition

Overloads

MetadataException()

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

MetadataException(String)

Initializes a new instance of MetadataException setting the message.

MetadataException(SerializationInfo, StreamingContext)
Obsolete.

Initializes a new instance of MetadataException with serialization parameters.

MetadataException(String, Exception)

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

MetadataException()

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

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

Applies to

MetadataException(String)

Initializes a new instance of MetadataException setting the message.

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

Parameters

message
String

The exception's message.

Applies to

MetadataException(SerializationInfo, StreamingContext)

Caution

Legacy serialization support is deprecated since .NET 8

Initializes a new instance of MetadataException with serialization parameters.

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

Parameters

info
SerializationInfo

Serialization information.

context
StreamingContext

Streaming context.

Attributes

Applies to

MetadataException(String, Exception)

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

public:
 MetadataException(System::String ^ message, Exception ^ innerException);
public MetadataException (string message, Exception innerException);
new System.Management.Automation.MetadataException : string * Exception -> System.Management.Automation.MetadataException
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