Breyta

Deila með


CustomAttributeFormatException Constructors

Definition

Initializes a new instance of the CustomAttributeFormatException class.

Overloads

CustomAttributeFormatException()

Initializes a new instance of the CustomAttributeFormatException class with the default properties.

CustomAttributeFormatException(String)

Initializes a new instance of the CustomAttributeFormatException class with the specified message.

CustomAttributeFormatException(SerializationInfo, StreamingContext)
Obsolete.

Initializes a new instance of the CustomAttributeFormatException class with the specified serialization and context information.

CustomAttributeFormatException(String, Exception)

Initializes a new instance of the CustomAttributeFormatException class with a specified error message and a reference to the inner exception that is the cause of this exception.

CustomAttributeFormatException()

Source:
CustomAttributeFormatException.cs
Source:
CustomAttributeFormatException.cs
Source:
CustomAttributeFormatException.cs

Initializes a new instance of the CustomAttributeFormatException class with the default properties.

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

Remarks

This constructor initializes an instance of CustomAttributeFormatException with an empty message string and the root cause exception set to null.

This constructor sets the properties of the Exception object as follows:

Property Value
InnerException null
Message The empty string ("").

Applies to

CustomAttributeFormatException(String)

Source:
CustomAttributeFormatException.cs
Source:
CustomAttributeFormatException.cs
Source:
CustomAttributeFormatException.cs

Initializes a new instance of the CustomAttributeFormatException class with the specified message.

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)

Parameters

message
String

The message that indicates the reason this exception was thrown.

Remarks

This constructor sets the properties of the Exception object as follows:

Property Value
InnerException null

See also

Applies to

CustomAttributeFormatException(SerializationInfo, StreamingContext)

Source:
CustomAttributeFormatException.cs
Source:
CustomAttributeFormatException.cs
Source:
CustomAttributeFormatException.cs

Caution

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

Initializes a new instance of the CustomAttributeFormatException class with the specified serialization and context information.

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)

Parameters

info
SerializationInfo

The data for serializing or deserializing the custom attribute.

context
StreamingContext

The source and destination for the custom attribute.

Attributes

Applies to

CustomAttributeFormatException(String, Exception)

Source:
CustomAttributeFormatException.cs
Source:
CustomAttributeFormatException.cs
Source:
CustomAttributeFormatException.cs

Initializes a new instance of the CustomAttributeFormatException class with a specified error message and a reference to the inner exception that is the cause of this exception.

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)

Parameters

message
String

The error message that explains the reason for the exception.

inner
Exception

The exception that is the cause of the current exception. If the inner parameter is not null, the current exception is raised in a catch block that handles the inner exception.

Remarks

An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the InnerException property. The InnerException property returns the same value that is passed into the constructor, or null if the InnerException property does not supply the inner exception value to the constructor.

The following table shows the initial property values for an instance of CustomAttributeFormatException.

Property Value
InnerException The inner exception.
Message The error message string.

See also

Applies to