Udostępnij przez


CustomAttributeFormatException Konstruktory

Definicja

Inicjuje nowe wystąpienie klasy CustomAttributeFormatException.

Przeciążenia

CustomAttributeFormatException()

Inicjuje CustomAttributeFormatException nowe wystąpienie klasy z domyślnymi właściwościami.

CustomAttributeFormatException(String)

Inicjuje nowe wystąpienie klasy CustomAttributeFormatException z określonym komunikatem.

CustomAttributeFormatException(SerializationInfo, StreamingContext)
Przestarzałe.

Inicjuje CustomAttributeFormatException nowe wystąpienie klasy z określonymi informacjami o serializacji i kontekście.

CustomAttributeFormatException(String, Exception)

Inicjuje nowe wystąpienie CustomAttributeFormatException klasy z określonym komunikatem o błędzie i odwołaniem do wewnętrznego wyjątku, który jest przyczyną tego wyjątku.

CustomAttributeFormatException()

Źródło:
CustomAttributeFormatException.cs
Źródło:
CustomAttributeFormatException.cs
Źródło:
CustomAttributeFormatException.cs

Inicjuje CustomAttributeFormatException nowe wystąpienie klasy z domyślnymi właściwościami.

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

Uwagi

Ten konstruktor inicjuje wystąpienie z CustomAttributeFormatException pustym ciągiem komunikatu i główną przyczyną wyjątku ustawionego na nullwartość .

Ten konstruktor ustawia właściwości Exception obiektu w następujący sposób:

Właściwość Wartość
InnerException null
Message Pusty ciąg ("").

Dotyczy

CustomAttributeFormatException(String)

Źródło:
CustomAttributeFormatException.cs
Źródło:
CustomAttributeFormatException.cs
Źródło:
CustomAttributeFormatException.cs

Inicjuje nowe wystąpienie klasy CustomAttributeFormatException z określonym komunikatem.

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)

Parametry

message
String

Komunikat wskazujący przyczynę, dla którego został zgłoszony ten wyjątek.

Uwagi

Ten konstruktor ustawia właściwości obiektu Exception w następujący sposób:

Właściwość Wartość
InnerException null

Zobacz też

Dotyczy

CustomAttributeFormatException(SerializationInfo, StreamingContext)

Źródło:
CustomAttributeFormatException.cs
Źródło:
CustomAttributeFormatException.cs
Źródło:
CustomAttributeFormatException.cs

Przestroga

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

Inicjuje CustomAttributeFormatException nowe wystąpienie klasy z określonymi informacjami o serializacji i kontekście.

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}")]
protected CustomAttributeFormatException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Reflection.CustomAttributeFormatException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Reflection.CustomAttributeFormatException
[<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
Protected Sub New (info As SerializationInfo, context As StreamingContext)

Parametry

info
SerializationInfo

Dane serializacji lub deserializacji atrybutu niestandardowego.

context
StreamingContext

Źródło i miejsce docelowe atrybutu niestandardowego.

Atrybuty

Dotyczy

CustomAttributeFormatException(String, Exception)

Źródło:
CustomAttributeFormatException.cs
Źródło:
CustomAttributeFormatException.cs
Źródło:
CustomAttributeFormatException.cs

Inicjuje nowe wystąpienie CustomAttributeFormatException klasy z określonym komunikatem o błędzie i odwołaniem do wewnętrznego wyjątku, który jest przyczyną tego wyjątku.

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)

Parametry

message
String

Komunikat o błędzie wyjaśniający przyczynę wyjątku.

inner
Exception

Wyjątek będący przyczyną bieżącego wyjątku. inner Jeśli parametr nie nulljest , bieżący wyjątek jest zgłaszany w catch bloku, który obsługuje wyjątek wewnętrzny.

Uwagi

Wyjątek zgłaszany bezpośrednio w wyniku poprzedniego wyjątku powinien zawierać odwołanie do poprzedniego wyjątku we właściwości InnerException. Właściwość InnerException zwraca tę samą wartość, która została przekazana do konstruktora, lub wartość null, jeśli właściwość InnerException nie przekazuje do konstruktora wartości wyjątku wewnętrznego.

Poniższa tabela prezentuje początkowe wartości właściwości dla wystąpienia klasy CustomAttributeFormatException.

Właściwość Wartość
InnerException Wyjątek inner .
Message Ciąg komunikatu o błędzie.

Zobacz też

Dotyczy