ExpectedSqlExceptionAttribute.MatchFirstError 屬性
取得值,該值代表預期的嚴重性、狀態和錯誤代碼是否應該與 SqlException 中的第一個 SqlError 比對。
命名空間: Microsoft.Data.Schema.UnitTesting
組件: Microsoft.Data.Schema.UnitTesting (在 Microsoft.Data.Schema.UnitTesting.dll 中)
語法
'宣告
Public Property MatchFirstError As Boolean
Get
Set
public bool MatchFirstError { get; set; }
public:
property bool MatchFirstError {
bool get ();
void set (bool value);
}
member MatchFirstError : bool with get, set
function get MatchFirstError () : boolean
function set MatchFirstError (value : boolean)
屬性值
型別:System.Boolean
若要將預期嚴重性、狀態和錯誤代碼和例外狀況中的第一個 SqlError 比對,則為 true。如果要將預期嚴重性、狀態和錯誤代碼與例外狀況中的任何 SqlError 比對,則為 false。
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。
請參閱
參考
ExpectedSqlExceptionAttribute 類別