CustomAttributeFormatException CustomAttributeFormatException CustomAttributeFormatException CustomAttributeFormatException Constructors

Definition

Overloads

CustomAttributeFormatException() CustomAttributeFormatException() CustomAttributeFormatException()

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

CustomAttributeFormatException(String) CustomAttributeFormatException(String) CustomAttributeFormatException(String) CustomAttributeFormatException(String)

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

CustomAttributeFormatException(SerializationInfo, StreamingContext) CustomAttributeFormatException(SerializationInfo, StreamingContext) CustomAttributeFormatException(SerializationInfo, StreamingContext) CustomAttributeFormatException(SerializationInfo, StreamingContext)

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

CustomAttributeFormatException(String, Exception) CustomAttributeFormatException(String, Exception) CustomAttributeFormatException(String, Exception) 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() CustomAttributeFormatException() CustomAttributeFormatException()

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 ("").

CustomAttributeFormatException(String) CustomAttributeFormatException(String) CustomAttributeFormatException(String) CustomAttributeFormatException(String)

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

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

Parameters

message
String String String 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

CustomAttributeFormatException(SerializationInfo, StreamingContext) CustomAttributeFormatException(SerializationInfo, StreamingContext) CustomAttributeFormatException(SerializationInfo, StreamingContext) CustomAttributeFormatException(SerializationInfo, StreamingContext)

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);
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 SerializationInfo SerializationInfo SerializationInfo

The data for serializing or deserializing the custom attribute.

context
StreamingContext StreamingContext StreamingContext StreamingContext

The source and destination for the custom attribute.

CustomAttributeFormatException(String, Exception) CustomAttributeFormatException(String, Exception) CustomAttributeFormatException(String, Exception) 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.

public:
 CustomAttributeFormatException(System::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 String String String

The error message that explains the reason for the exception.

inner
Exception Exception Exception 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