Modifica

CodeDomSerializerException Class

Definition

The exception that is thrown when line number information is available for a serialization error.

public ref class CodeDomSerializerException : SystemException
public class CodeDomSerializerException : SystemException
type CodeDomSerializerException = class
    inherit SystemException
Public Class CodeDomSerializerException
Inherits SystemException
Inheritance
CodeDomSerializerException

Examples

The following code example throws a CodeDomSerializerException with an example message and a CodeLinePragma.

throw gcnew CodeDomSerializerException( "This exception was raised as an example.", gcnew CodeLinePragma( "Example.txt", 20 ) );
throw new CodeDomSerializerException("This exception was raised as an example.", new CodeLinePragma("Example.txt", 20));
Throw New CodeDomSerializerException("This exception was raised as an example.", New CodeLinePragma("Example.txt", 20))

Remarks

This exception is thrown when the serializer encounters an error. This exception allows the serializer to return information about the location and type of the error.

Constructors

Name Description
CodeDomSerializerException(Exception, CodeLinePragma)

Initializes a new instance of the CodeDomSerializerException class using the specified exception and line information.

CodeDomSerializerException(Exception, IDesignerSerializationManager)

Initializes a new instance of the CodeDomSerializerException class.

CodeDomSerializerException(String, CodeLinePragma)

Initializes a new instance of the CodeDomSerializerException class using the specified message and line information.

CodeDomSerializerException(String, IDesignerSerializationManager)

Initializes a new instance of the CodeDomSerializerException class.

Properties

Name Description
LinePragma

Gets or sets the line information for the error associated with this exception.

Methods

Name Description
GetObjectData(SerializationInfo, StreamingContext)
Obsolete.

Sets the SerializationInfo object with the parameter name and additional exception information.

Applies to