PersistenceException Constructors

Definition

Initializes a new instance of the PersistenceException class.

Overloads

PersistenceException()

Initializes a new instance of the PersistenceException class.

PersistenceException(String)

Initializes a new instance of the PersistenceException class by using the specified message.

PersistenceException(SerializationInfo, StreamingContext)

Initializes a new instance of the PersistenceException class by using the specified SerializationInfo and the specified StreamingContext.

PersistenceException(String, Exception)

Initializes a new instance of the PersistenceException by using the specified message and Exception.

PersistenceException()

Initializes a new instance of the PersistenceException class.

C#
public PersistenceException();

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 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

PersistenceException(String)

Initializes a new instance of the PersistenceException class by using the specified message.

C#
public PersistenceException(string message);

Parameters

message
String

A description of the cause of the exception.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 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

PersistenceException(SerializationInfo, StreamingContext)

Initializes a new instance of the PersistenceException class by using the specified SerializationInfo and the specified StreamingContext.

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

Parameters

info
SerializationInfo

A SerializationInfo that holds the serialized object data.

context
StreamingContext

A StreamingContext that holds contextual information about the source or destination.

Remarks

This constructor is called during deserialization to reconstitute the exception object transmitted over a stream. For more information, see XML and SOAP Serialization.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 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

PersistenceException(String, Exception)

Initializes a new instance of the PersistenceException by using the specified message and Exception.

C#
public PersistenceException(string message, Exception innerException);

Parameters

message
String

A description of the cause of the exception.

innerException
Exception

The exception that caused the PersistenceException to be thrown.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 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