Edit

Share via


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)
Obsolete.

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

Source:
DataException.cs
Source:
DataException.cs
Source:
DataException.cs

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

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

Applies to

ConstraintException(String)

Source:
DataException.cs
Source:
DataException.cs
Source:
DataException.cs

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)

Source:
DataException.cs
Source:
DataException.cs
Source:
DataException.cs

Caution

This API supports obsolete formatter-based serialization. It should not be called or extended by application code.

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);
[System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
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
[<System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
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.

Attributes

Applies to

ConstraintException(String, Exception)

Source:
DataException.cs
Source:
DataException.cs
Source:
DataException.cs

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