ConstraintException Constructors

Definition

Initializes a new instance of the ConstraintException class.

Overloads

ConstraintException()

Initializes a new instance of the ConstraintException class. This is the parameterless constructor.

ConstraintException(String)

Initializes a new instance of the ConstraintException class with the specified string.

ConstraintException(SerializationInfo, StreamingContext)

Initializes a new instance of the ConstraintException class using the specified serialization and stream context.

ConstraintException(String, Exception)

Initializes a new instance of the ConstraintException class using the specified string and inner exception.

ConstraintException()

Initializes a new instance of the ConstraintException class. This is the parameterless constructor.

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

Applies to

ConstraintException(String)

Initializes a new instance of the ConstraintException class with the specified string.

public:
 ConstraintException(System::String ^ s);
public ConstraintException (string? s);
public ConstraintException (string s);
new System.Data.ConstraintException : string -> System.Data.ConstraintException
Public Sub New (s As String)

Parameters

s
String

The string to display when the exception is thrown.

Applies to

ConstraintException(SerializationInfo, StreamingContext)

Initializes a new instance of the ConstraintException class using the specified serialization and stream context.

protected:
 ConstraintException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected ConstraintException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Data.ConstraintException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Data.ConstraintException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

Parameters

info
SerializationInfo

The data necessary to serialize or deserialize an object.

context
StreamingContext

Description of the source and destination of the specified serialized stream.

Applies to

ConstraintException(String, Exception)

Initializes a new instance of the ConstraintException class using the specified string and inner exception.

public:
 ConstraintException(System::String ^ message, Exception ^ innerException);
public ConstraintException (string? message, Exception? innerException);
public ConstraintException (string message, Exception innerException);
new System.Data.ConstraintException : string * Exception -> System.Data.ConstraintException
Public Sub New (message As String, innerException As Exception)

Parameters

message
String

The string to display when the exception is thrown.

innerException
Exception

Gets the Exception instance that caused the current exception.

Applies to