ConstraintException 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 ConstraintException 類別的新執行個體。
多載
| 名稱 | Description |
|---|---|
| ConstraintException() |
初始化 ConstraintException 類別的新執行個體。 這就是無參數建構子。 |
| ConstraintException(String) |
初始化一個包含指定字串的 ConstraintException 類別實例。 |
| ConstraintException(SerializationInfo, StreamingContext) |
已淘汰.
使用指定的序列化與串流上下文初始化該類別的新 ConstraintException 實例。 |
| ConstraintException(String, Exception) |
使用指定的字串與內部例外初始化該類別的新實例 ConstraintException 。 |
ConstraintException()
初始化 ConstraintException 類別的新執行個體。 這就是無參數建構子。
public:
ConstraintException();
public ConstraintException();
Public Sub New ()
適用於
ConstraintException(String)
初始化一個包含指定字串的 ConstraintException 類別實例。
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)
參數
- s
- String
當例外被拋出時,該字串要顯示。
適用於
ConstraintException(SerializationInfo, StreamingContext)
警告
This API supports obsolete formatter-based serialization. It should not be called or extended by application code.
使用指定的序列化與串流上下文初始化該類別的新 ConstraintException 實例。
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);
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}")>]
new System.Data.ConstraintException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Data.ConstraintException
new System.Data.ConstraintException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Data.ConstraintException
Protected Sub New (info As SerializationInfo, context As StreamingContext)
參數
- info
- SerializationInfo
序列化或反序列化物件所需的資料。
- context
- StreamingContext
指定序列化串流的來源與目的地描述。
- 屬性
適用於
ConstraintException(String, Exception)
使用指定的字串與內部例外初始化該類別的新實例 ConstraintException 。
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)
參數
- message
- String
當例外被拋出時,該字串要顯示。
- innerException
- Exception
會取得 Exception 造成目前例外的實例。