InvalidConstraintException 构造函数

定义

初始化 InvalidConstraintException 类的新实例。

重载

InvalidConstraintException()

初始化 InvalidConstraintException 类的新实例。

InvalidConstraintException(String)

使用指定的字符串初始化 InvalidConstraintException 类的新实例。

InvalidConstraintException(SerializationInfo, StreamingContext)
已过时.

使用序列化信息初始化 InvalidConstraintException 类的新实例。

InvalidConstraintException(String, Exception)

使用指定的错误消息和对作为此异常原因的内部异常的引用来初始化 InvalidConstraintException 类的新实例。

InvalidConstraintException()

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

初始化 InvalidConstraintException 类的新实例。

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

适用于

InvalidConstraintException(String)

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

使用指定的字符串初始化 InvalidConstraintException 类的新实例。

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

参数

s
String

引发异常时显示的字符串。

适用于

InvalidConstraintException(SerializationInfo, StreamingContext)

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

注意

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

使用序列化信息初始化 InvalidConstraintException 类的新实例。

protected:
 InvalidConstraintException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected InvalidConstraintException (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 InvalidConstraintException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Data.InvalidConstraintException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Data.InvalidConstraintException
[<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.InvalidConstraintException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Data.InvalidConstraintException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

参数

info
SerializationInfo

序列化或反序列化对象时所需的数据。

context
StreamingContext

指定的序列化流的源和目标的说明。

属性

另请参阅

适用于

InvalidConstraintException(String, Exception)

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

使用指定的错误消息和对作为此异常原因的内部异常的引用来初始化 InvalidConstraintException 类的新实例。

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

参数

message
String

解释异常原因的错误消息。

innerException
Exception

导致当前异常的异常;如果未指定内部异常,则是一个 null 引用(在 Visual Basic 中为 Nothing)。

适用于