CodeDomSerializerException Constructors

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Initializes a new instance of the CodeDomSerializerException class.

Overloads

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(SerializationInfo, StreamingContext)

Initializes a new instance of the CodeDomSerializerException class using the specified serialization data and context.

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.

CodeDomSerializerException(Exception, CodeLinePragma)

Source:
CodeDomSerializerException.cs
Source:
CodeDomSerializerException.cs
Source:
CodeDomSerializerException.cs

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

C#
public CodeDomSerializerException(Exception ex, System.CodeDom.CodeLinePragma linePragma);
C#
public CodeDomSerializerException(Exception? ex, System.CodeDom.CodeLinePragma? linePragma);

Parameters

ex
Exception

The exception to throw.

linePragma
CodeLinePragma

A CodeLinePragma that indicates where the exception occurred.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

CodeDomSerializerException(Exception, IDesignerSerializationManager)

Source:
CodeDomSerializerException.cs
Source:
CodeDomSerializerException.cs
Source:
CodeDomSerializerException.cs

Initializes a new instance of the CodeDomSerializerException class.

C#
public CodeDomSerializerException(Exception ex, System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager);
C#
public CodeDomSerializerException(Exception? ex, System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager);

Parameters

ex
Exception

The exception to throw.

manager
IDesignerSerializationManager

The IDesignerSerializationManager object from which to extract the context.

Exceptions

manager is null.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

CodeDomSerializerException(SerializationInfo, StreamingContext)

Initializes a new instance of the CodeDomSerializerException class using the specified serialization data and context.

C#
protected CodeDomSerializerException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);

Parameters

info
SerializationInfo

Stores the data that was being used to serialize or deserialize the object that the CodeDomSerializer was serializing or deserializing.

context
StreamingContext

Describes the source and destination of the stream that generated the exception, as well as a means for serialization to retain that context and an additional caller-defined context.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

CodeDomSerializerException(String, CodeLinePragma)

Source:
CodeDomSerializerException.cs
Source:
CodeDomSerializerException.cs
Source:
CodeDomSerializerException.cs

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

C#
public CodeDomSerializerException(string message, System.CodeDom.CodeLinePragma linePragma);
C#
public CodeDomSerializerException(string? message, System.CodeDom.CodeLinePragma? linePragma);

Parameters

message
String

A message describing the exception.

linePragma
CodeLinePragma

A CodeLinePragma that indicates where the exception occurred.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

CodeDomSerializerException(String, IDesignerSerializationManager)

Source:
CodeDomSerializerException.cs
Source:
CodeDomSerializerException.cs
Source:
CodeDomSerializerException.cs

Initializes a new instance of the CodeDomSerializerException class.

C#
public CodeDomSerializerException(string message, System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager);
C#
public CodeDomSerializerException(string? message, System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager);

Parameters

message
String

A message describing the exception.

manager
IDesignerSerializationManager

The IDesignerSerializationManager object from which to extract the context.

Exceptions

manager is null.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10