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
true 表示将预期的严重级别、状态和错误号与异常中的第一个 SqlError 匹配;false 表示将预期的严重级别、状态和错误号与异常中的任何 SqlError 匹配。

.NET Framework 安全性

请参见

参考

ExpectedSqlExceptionAttribute 类

Microsoft.Data.Schema.UnitTesting 命名空间

SqlException

SqlError