Condividi tramite


CustomAttributeFormatException Costruttori

Definizione

Inizializza una nuova istanza della classe CustomAttributeFormatException.

Overload

Nome Descrizione
CustomAttributeFormatException()

Inizializza una nuova istanza della CustomAttributeFormatException classe con le proprietà predefinite.

CustomAttributeFormatException(String)

Inizializza una nuova istanza della CustomAttributeFormatException classe con il messaggio specificato.

CustomAttributeFormatException(SerializationInfo, StreamingContext)
Obsoleti.

Inizializza una nuova istanza della CustomAttributeFormatException classe con le informazioni di serializzazione e contesto specificate.

CustomAttributeFormatException(String, Exception)

Inizializza una nuova istanza della CustomAttributeFormatException classe con un messaggio di errore specificato e un riferimento all'eccezione interna che è la causa di questa eccezione.

CustomAttributeFormatException()

Origine:
CustomAttributeFormatException.cs
Origine:
CustomAttributeFormatException.cs
Origine:
CustomAttributeFormatException.cs
Origine:
CustomAttributeFormatException.cs
Origine:
CustomAttributeFormatException.cs

Inizializza una nuova istanza della CustomAttributeFormatException classe con le proprietà predefinite.

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

Commenti

Questo costruttore inizializza un'istanza di con una stringa di CustomAttributeFormatException messaggio vuota e l'eccezione della causa radice impostata su null.

Questo costruttore imposta le proprietà dell'oggetto Exception nel modo seguente:

Proprietà Valore
InnerException Null
Message Stringa vuota ("").

Si applica a

CustomAttributeFormatException(String)

Origine:
CustomAttributeFormatException.cs
Origine:
CustomAttributeFormatException.cs
Origine:
CustomAttributeFormatException.cs
Origine:
CustomAttributeFormatException.cs
Origine:
CustomAttributeFormatException.cs

Inizializza una nuova istanza della CustomAttributeFormatException classe con il messaggio specificato.

public:
 CustomAttributeFormatException(System::String ^ message);
public CustomAttributeFormatException(string? message);
public CustomAttributeFormatException(string message);
new System.Reflection.CustomAttributeFormatException : string -> System.Reflection.CustomAttributeFormatException
Public Sub New (message As String)

Parametri

message
String

Messaggio che indica il motivo per cui è stata generata l'eccezione.

Commenti

Questo costruttore imposta le proprietà dell'oggetto Exception come indicato di seguito:

Proprietà Valore
InnerException null

Vedi anche

Si applica a

CustomAttributeFormatException(SerializationInfo, StreamingContext)

Origine:
CustomAttributeFormatException.cs
Origine:
CustomAttributeFormatException.cs
Origine:
CustomAttributeFormatException.cs
Origine:
CustomAttributeFormatException.cs
Origine:
CustomAttributeFormatException.cs

Attenzione

This API supports obsolete formatter-based serialization. It should not be called or extended by application code.

Inizializza una nuova istanza della CustomAttributeFormatException classe con le informazioni di serializzazione e contesto specificate.

protected:
 CustomAttributeFormatException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
[System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
protected CustomAttributeFormatException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
protected CustomAttributeFormatException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[<System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Reflection.CustomAttributeFormatException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Reflection.CustomAttributeFormatException
new System.Reflection.CustomAttributeFormatException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Reflection.CustomAttributeFormatException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

Parametri

info
SerializationInfo

Dati per la serializzazione o la deserializzazione dell'attributo personalizzato.

context
StreamingContext

Origine e destinazione per l'attributo personalizzato.

Attributi

Si applica a

CustomAttributeFormatException(String, Exception)

Origine:
CustomAttributeFormatException.cs
Origine:
CustomAttributeFormatException.cs
Origine:
CustomAttributeFormatException.cs
Origine:
CustomAttributeFormatException.cs
Origine:
CustomAttributeFormatException.cs

Inizializza una nuova istanza della CustomAttributeFormatException classe con un messaggio di errore specificato e un riferimento all'eccezione interna che è la causa di questa eccezione.

public:
 CustomAttributeFormatException(System::String ^ message, Exception ^ inner);
public CustomAttributeFormatException(string? message, Exception? inner);
public CustomAttributeFormatException(string message, Exception inner);
new System.Reflection.CustomAttributeFormatException : string * Exception -> System.Reflection.CustomAttributeFormatException
Public Sub New (message As String, inner As Exception)

Parametri

message
String

Messaggio di errore che spiega il motivo dell'eccezione.

inner
Exception

Eccezione che rappresenta la causa dell'eccezione corrente. Se il inner parametro non nullè , l'eccezione corrente viene generata in un catch blocco che gestisce l'eccezione interna.

Commenti

Un'eccezione generata come risultato diretto di un'eccezione precedente deve includere un riferimento all'eccezione precedente nella InnerException proprietà . La InnerException proprietà restituisce lo stesso valore passato al costruttore oppure null se la InnerException proprietà non fornisce il valore dell'eccezione interna al costruttore.

Nella tabella seguente vengono illustrati i valori iniziali delle proprietà per un'istanza di CustomAttributeFormatException.

Proprietà Valore
InnerException Eccezione inner .
Message Stringa del messaggio di errore.

Vedi anche

Si applica a