Assert.DoesNotContain 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
DoesNotContain(String, String, StringComparison, String)
測試指定字串是否包含指定的子字串,若子字串位於測試字串內,則拋出例外。
public static void DoesNotContain(string substring, string value, StringComparison comparisonType, string? message);
static member DoesNotContain : string * string * StringComparison * string -> unit
Public Shared Sub DoesNotContain (substring As String, value As String, comparisonType As StringComparison, message As String)
參數
- substring
- String
該字串預期不會出現在 value。
- value
- String
預期不包含 substring的字串。
- comparisonType
- StringComparison
比較字串 comparisonType的方法。
- message
- String
當 substring 屬於 value時,要包含在例外中的訊息。 該訊息會顯示在測試結果中。
例外狀況
value 是空,或 substring 是空,或 value 包含 substring。
適用於
DoesNotContain(String, String, StringComparison, String, String, String)
測試指定字串是否包含指定的子字串,若子字串位於測試字串內,則拋出例外。
public static void DoesNotContain(string substring, string value, StringComparison comparisonType, string? message = "", string substringExpression = "", string valueExpression = "");
static member DoesNotContain : string * string * StringComparison * string * string * string -> unit
Public Shared Sub DoesNotContain (substring As String, value As String, comparisonType As StringComparison, Optional message As String = "", Optional substringExpression As String = "", Optional valueExpression As String = "")
參數
- substring
- String
該字串預期不會出現在 value。
- value
- String
預期不包含 substring的字串。
- comparisonType
- StringComparison
比較字串 comparisonType的方法。
- message
- String
當 substring 屬於 value時,要包含在例外中的訊息。 該訊息會顯示在測試結果中。
- substringExpression
- String
由編譯器透過呼叫者參數表達式所提供的子字串語法表達式。 使用者不應該傳遞這個參數的值。
- valueExpression
- String
由編譯器透過呼叫者參數表達式所給出的語法表達式。 使用者不應該傳遞這個參數的值。
例外狀況
value 是空,或 substring 是空,或 value 包含 substring。
適用於
DoesNotContain(Object, IEnumerable, IEqualityComparer, String, String, String)
測試指定的集合是否包含指定的項目。
public static void DoesNotContain(object? notExpected, System.Collections.IEnumerable collection, System.Collections.IEqualityComparer comparer, string? message = "", string notExpectedExpression = "", string collectionExpression = "");
static member DoesNotContain : obj * System.Collections.IEnumerable * System.Collections.IEqualityComparer * string * string * string -> unit
Public Shared Sub DoesNotContain (notExpected As Object, collection As IEnumerable, comparer As IEqualityComparer, Optional message As String = "", Optional notExpectedExpression As String = "", Optional collectionExpression As String = "")
參數
- notExpected
- Object
意外的物品。
- collection
- IEnumerable
集合。
- comparer
- IEqualityComparer
一個等式比較器用來比較數值。
- message
- String
當斷言失敗時顯示的訊息。
- notExpectedExpression
- String
notExpected 的語法表達式由編譯器透過呼叫者參數表達式所給出。 使用者不應該傳遞這個參數的值。
- collectionExpression
- String
由編譯器透過呼叫者參數表達式所提供的收集語法表達式。 使用者不應該傳遞這個參數的值。
適用於
DoesNotContain(String, String, StringComparison, String, Object[])
測試指定字串是否包含指定的子字串,若子字串位於測試字串內,則拋出例外。
public static void DoesNotContain(string substring, string value, StringComparison comparisonType, string? message, params object?[]? parameters);
static member DoesNotContain : string * string * StringComparison * string * obj[] -> unit
Public Shared Sub DoesNotContain (substring As String, value As String, comparisonType As StringComparison, message As String, ParamArray parameters As Object())
參數
- substring
- String
該字串預期不會出現在 value。
- value
- String
預期不包含 substring的字串。
- comparisonType
- StringComparison
比較字串 comparisonType的方法。
- message
- String
當 substring 屬於 value時,要包含在例外中的訊息。 該訊息會顯示在測試結果中。
- parameters
- Object[]
一個用於格式化 message的參數陣列。
例外狀況
value 是空,或 substring 是空,或 value 包含 substring。
適用於
DoesNotContain(String, String, String, String, String)
測試指定字串是否包含指定的子字串,若子字串位於測試字串內,則拋出例外。
public static void DoesNotContain(string substring, string value, string? message = "", string substringExpression = "", string valueExpression = "");
static member DoesNotContain : string * string * string * string * string -> unit
Public Shared Sub DoesNotContain (substring As String, value As String, Optional message As String = "", Optional substringExpression As String = "", Optional valueExpression As String = "")
參數
- substring
- String
該字串預期不會出現在 value。
- value
- String
預期不包含 substring的字串。
- message
- String
當 substring 屬於 value時,要包含在例外中的訊息。 該訊息會顯示在測試結果中。
- substringExpression
- String
由編譯器透過呼叫者參數表達式所提供的子字串語法表達式。 使用者不應該傳遞這個參數的值。
- valueExpression
- String
由編譯器透過呼叫者參數表達式所給出的語法表達式。 使用者不應該傳遞這個參數的值。
例外狀況
value 是空,或 substring 是空,或 value 包含 substring。
適用於
DoesNotContain(Object, IEnumerable, String, String, String)
測試指定的集合是否包含指定的項目。
public static void DoesNotContain(object? notExpected, System.Collections.IEnumerable collection, string? message = "", string notExpectedExpression = "", string collectionExpression = "");
static member DoesNotContain : obj * System.Collections.IEnumerable * string * string * string -> unit
Public Shared Sub DoesNotContain (notExpected As Object, collection As IEnumerable, Optional message As String = "", Optional notExpectedExpression As String = "", Optional collectionExpression As String = "")
參數
- notExpected
- Object
意外的物品。
- collection
- IEnumerable
集合。
- message
- String
當斷言失敗時顯示的訊息。
- notExpectedExpression
- String
notExpected 的語法表達式由編譯器透過呼叫者參數表達式所給出。 使用者不應該傳遞這個參數的值。
- collectionExpression
- String
由編譯器透過呼叫者參數表達式所提供的收集語法表達式。 使用者不應該傳遞這個參數的值。
適用於
DoesNotContain(Func<Object,Boolean>, IEnumerable, String, String, String)
測試指定的集合是否包含指定的項目。
public static void DoesNotContain(Func<object?,bool> predicate, System.Collections.IEnumerable collection, string? message = "", string predicateExpression = "", string collectionExpression = "");
static member DoesNotContain : Func<obj, bool> * System.Collections.IEnumerable * string * string * string -> unit
Public Shared Sub DoesNotContain (predicate As Func(Of Object, Boolean), collection As IEnumerable, Optional message As String = "", Optional predicateExpression As String = "", Optional collectionExpression As String = "")
參數
- collection
- IEnumerable
集合。
- message
- String
當斷言失敗時顯示的訊息。
- predicateExpression
- String
謂詞的語法表達式由編譯器透過呼叫者參數表達式給出。 使用者不應該傳遞這個參數的值。
- collectionExpression
- String
由編譯器透過呼叫者參數表達式所提供的收集語法表達式。 使用者不應該傳遞這個參數的值。
適用於
DoesNotContain(Object, IEnumerable, IEqualityComparer, String)
使用自訂的等號比較器測試指定的非通用集合是否包含指定的項目。
public static void DoesNotContain(object? expected, System.Collections.IEnumerable collection, System.Collections.IEqualityComparer comparer, string? message);
static member DoesNotContain : obj * System.Collections.IEnumerable * System.Collections.IEqualityComparer * string -> unit
Public Shared Sub DoesNotContain (expected As Object, collection As IEnumerable, comparer As IEqualityComparer, message As String)
參數
- expected
- Object
預期中的物品。
- collection
- IEnumerable
非通用收藏。
- comparer
- IEqualityComparer
一個等式比較器用來比較數值。
- message
- String
當斷言失敗時顯示的訊息。
適用於
DoesNotContain(String, String, String, Object[])
測試指定字串是否包含指定的子字串,若子字串位於測試字串內,則拋出例外。
public static void DoesNotContain(string substring, string value, string? message, params object?[]? parameters);
static member DoesNotContain : string * string * string * obj[] -> unit
Public Shared Sub DoesNotContain (substring As String, value As String, message As String, ParamArray parameters As Object())
參數
- substring
- String
該字串預期不會出現在 value。
- value
- String
預期不包含 substring的字串。
- message
- String
當 substring 屬於 value時,要包含在例外中的訊息。 該訊息會顯示在測試結果中。
- parameters
- Object[]
一個用於格式化 message的參數陣列。
例外狀況
value 是空,或 substring 是空,或 value 包含 substring。
適用於
DoesNotContain(String, String, String)
測試指定字串是否包含指定的子字串,若子字串位於測試字串內,則拋出例外。
public static void DoesNotContain(string substring, string value, string? message);
static member DoesNotContain : string * string * string -> unit
Public Shared Sub DoesNotContain (substring As String, value As String, message As String)
參數
- substring
- String
該字串預期不會出現在 value。
- value
- String
預期不包含 substring的字串。
- message
- String
當 substring 屬於 value時,要包含在例外中的訊息。 該訊息會顯示在測試結果中。
例外狀況
value 是空,或 substring 是空,或 value 包含 substring。
適用於
DoesNotContain(Object, IEnumerable, String)
測試指定的非通用集合是否包含指定的項目。
public static void DoesNotContain(object? expected, System.Collections.IEnumerable collection, string? message);
static member DoesNotContain : obj * System.Collections.IEnumerable * string -> unit
Public Shared Sub DoesNotContain (expected As Object, collection As IEnumerable, message As String)
參數
- expected
- Object
預期中的物品。
- collection
- IEnumerable
非通用收藏。
- message
- String
當斷言失敗時顯示的訊息。
適用於
DoesNotContain(Object, IEnumerable, IEqualityComparer)
測試指定的集合是否包含指定的項目。
public static void DoesNotContain(object? expected, System.Collections.IEnumerable collection, System.Collections.IEqualityComparer comparer);
static member DoesNotContain : obj * System.Collections.IEnumerable * System.Collections.IEqualityComparer -> unit
Public Shared Sub DoesNotContain (expected As Object, collection As IEnumerable, comparer As IEqualityComparer)
參數
- expected
- Object
預期中的物品。
- collection
- IEnumerable
集合。
- comparer
- IEqualityComparer
一個等式比較器用來比較數值。
適用於
DoesNotContain(Func<Object,Boolean>, IEnumerable, String)
測試指定的集合是否包含指定的項目。
public static void DoesNotContain(Func<object?,bool> predicate, System.Collections.IEnumerable collection, string? message);
static member DoesNotContain : Func<obj, bool> * System.Collections.IEnumerable * string -> unit
Public Shared Sub DoesNotContain (predicate As Func(Of Object, Boolean), collection As IEnumerable, message As String)
參數
- collection
- IEnumerable
集合。
- message
- String
當斷言失敗時顯示的訊息。
適用於
DoesNotContain(String, String)
測試指定字串是否包含指定的子字串,若子字串位於測試字串內,則拋出例外。
public static void DoesNotContain(string substring, string value);
static member DoesNotContain : string * string -> unit
Public Shared Sub DoesNotContain (substring As String, value As String)
參數
- substring
- String
該字串預期不會出現在 value。
- value
- String
預期不包含 substring的字串。
例外狀況
value 是空,或 substring 是空,或 value 包含 substring。
適用於
DoesNotContain(Object, IEnumerable)
測試指定的非通用集合是否包含指定的項目。
public static void DoesNotContain(object? expected, System.Collections.IEnumerable collection);
static member DoesNotContain : obj * System.Collections.IEnumerable -> unit
Public Shared Sub DoesNotContain (expected As Object, collection As IEnumerable)
參數
- expected
- Object
預期中的物品。
- collection
- IEnumerable
非通用收藏。
適用於
DoesNotContain(Func<Object,Boolean>, IEnumerable)
測試指定的集合是否包含指定的項目。
public static void DoesNotContain(Func<object?,bool> predicate, System.Collections.IEnumerable collection);
static member DoesNotContain : Func<obj, bool> * System.Collections.IEnumerable -> unit
Public Shared Sub DoesNotContain (predicate As Func(Of Object, Boolean), collection As IEnumerable)
參數
- collection
- IEnumerable
集合。
適用於
DoesNotContain(String, String, StringComparison)
測試指定字串是否包含指定的子字串,若子字串位於測試字串內,則拋出例外。
public static void DoesNotContain(string substring, string value, StringComparison comparisonType);
static member DoesNotContain : string * string * StringComparison -> unit
Public Shared Sub DoesNotContain (substring As String, value As String, comparisonType As StringComparison)
參數
- substring
- String
該字串預期不會出現在 value。
- value
- String
預期不包含 substring的字串。
- comparisonType
- StringComparison
比較字串 comparisonType的方法。
例外狀況
value 是空,或 substring 是空,或 value 包含 substring。
適用於
DoesNotContain<T>(T, IEnumerable<T>, IEqualityComparer<T>, String, Object[])
測試指定的集合是否包含指定的項目。
public static void DoesNotContain<T>(T expected, System.Collections.Generic.IEnumerable<T> collection, System.Collections.Generic.IEqualityComparer<T> comparer, string? message, params object?[]? parameters);
static member DoesNotContain : 'T * seq<'T> * System.Collections.Generic.IEqualityComparer<'T> * string * obj[] -> unit
Public Shared Sub DoesNotContain(Of T) (expected As T, collection As IEnumerable(Of T), comparer As IEqualityComparer(Of T), message As String, ParamArray parameters As Object())
類型參數
- T
收藏品的類型。
參數
- expected
- T
預期中的物品。
- collection
- IEnumerable<T>
集合。
- comparer
- IEqualityComparer<T>
一個等式比較器用來比較數值。
- message
- String
當斷言失敗時顯示的訊息。
- parameters
- Object[]
格式化訊息的參數。
適用於
DoesNotContain<T>(T, IEnumerable<T>, String, String, String)
測試指定的集合是否包含指定的項目。
public static void DoesNotContain<T>(T notExpected, System.Collections.Generic.IEnumerable<T> collection, string? message = "", string notExpectedExpression = "", string collectionExpression = "");
static member DoesNotContain : 'T * seq<'T> * string * string * string -> unit
Public Shared Sub DoesNotContain(Of T) (notExpected As T, collection As IEnumerable(Of T), Optional message As String = "", Optional notExpectedExpression As String = "", Optional collectionExpression As String = "")
類型參數
- T
收藏品的類型。
參數
- notExpected
- T
意外的物品。
- collection
- IEnumerable<T>
集合。
- message
- String
當斷言失敗時顯示的訊息。
- notExpectedExpression
- String
notExpected 的語法表達式由編譯器透過呼叫者參數表達式所給出。 使用者不應該傳遞這個參數的值。
- collectionExpression
- String
由編譯器透過呼叫者參數表達式所提供的收集語法表達式。 使用者不應該傳遞這個參數的值。
適用於
DoesNotContain<T>(T, Memory<T>, String, String, String)
測試指定的記憶體是否包含指定的項目。
public static void DoesNotContain<T>(T notExpected, Memory<T> collection, string? message = "", string notExpectedExpression = "", string collectionExpression = "");
static member DoesNotContain : 'T * Memory<'T> * string * string * string -> unit
Public Shared Sub DoesNotContain(Of T) (notExpected As T, collection As Memory(Of T), Optional message As String = "", Optional notExpectedExpression As String = "", Optional collectionExpression As String = "")
類型參數
- T
記憶物品的種類。
參數
- notExpected
- T
意外的物品。
- collection
- Memory<T>
那段記憶。
- message
- String
當斷言失敗時顯示的訊息。
- notExpectedExpression
- String
notExpected 的語法表達式由編譯器透過呼叫者參數表達式所給出。 使用者不應該傳遞這個參數的值。
- collectionExpression
- String
由編譯器透過呼叫者參數表達式所提供的收集語法表達式。 使用者不應該傳遞這個參數的值。
適用於
DoesNotContain<T>(T, ReadOnlyMemory<T>, String, String, String)
測試指定的記憶體是否包含指定的項目。
public static void DoesNotContain<T>(T notExpected, ReadOnlyMemory<T> collection, string? message = "", string notExpectedExpression = "", string collectionExpression = "");
static member DoesNotContain : 'T * ReadOnlyMemory<'T> * string * string * string -> unit
Public Shared Sub DoesNotContain(Of T) (notExpected As T, collection As ReadOnlyMemory(Of T), Optional message As String = "", Optional notExpectedExpression As String = "", Optional collectionExpression As String = "")
類型參數
- T
記憶物品的種類。
參數
- notExpected
- T
意外的物品。
- collection
- ReadOnlyMemory<T>
那段記憶。
- message
- String
當斷言失敗時顯示的訊息。
- notExpectedExpression
- String
notExpected 的語法表達式由編譯器透過呼叫者參數表達式所給出。 使用者不應該傳遞這個參數的值。
- collectionExpression
- String
由編譯器透過呼叫者參數表達式所提供的收集語法表達式。 使用者不應該傳遞這個參數的值。
適用於
DoesNotContain<T>(T, ReadOnlySpan<T>, String, String, String)
測試指定區間是否包含指定項目。
public static void DoesNotContain<T>(T notExpected, ReadOnlySpan<T> collection, string? message = "", string notExpectedExpression = "", string collectionExpression = "");
static member DoesNotContain : 'T * ReadOnlySpan<'T> * string * string * string -> unit
Public Shared Sub DoesNotContain(Of T) (notExpected As T, collection As ReadOnlySpan(Of T), Optional message As String = "", Optional notExpectedExpression As String = "", Optional collectionExpression As String = "")
類型參數
- T
跨度項目的類型。
參數
- notExpected
- T
意外的物品。
- collection
- ReadOnlySpan<T>
跨度。
- message
- String
當斷言失敗時顯示的訊息。
- notExpectedExpression
- String
notExpected 的語法表達式由編譯器透過呼叫者參數表達式所給出。 使用者不應該傳遞這個參數的值。
- collectionExpression
- String
由編譯器透過呼叫者參數表達式所提供的收集語法表達式。 使用者不應該傳遞這個參數的值。
適用於
DoesNotContain<T>(T, ReadOnlySpan<T>, IEqualityComparer<T>, String, String, String)
測試指定區間是否包含指定項目。
public static void DoesNotContain<T>(T notExpected, ReadOnlySpan<T> collection, System.Collections.Generic.IEqualityComparer<T> comparer, string? message = "", string notExpectedExpression = "", string collectionExpression = "");
static member DoesNotContain : 'T * ReadOnlySpan<'T> * System.Collections.Generic.IEqualityComparer<'T> * string * string * string -> unit
Public Shared Sub DoesNotContain(Of T) (notExpected As T, collection As ReadOnlySpan(Of T), comparer As IEqualityComparer(Of T), Optional message As String = "", Optional notExpectedExpression As String = "", Optional collectionExpression As String = "")
類型參數
- T
跨度項目的類型。
參數
- notExpected
- T
意外的物品。
- collection
- ReadOnlySpan<T>
跨度。
- comparer
- IEqualityComparer<T>
一個等式比較器用來比較數值。
- message
- String
當斷言失敗時顯示的訊息。
- notExpectedExpression
- String
notExpected 的語法表達式由編譯器透過呼叫者參數表達式所給出。 使用者不應該傳遞這個參數的值。
- collectionExpression
- String
由編譯器透過呼叫者參數表達式所提供的收集語法表達式。 使用者不應該傳遞這個參數的值。
適用於
DoesNotContain<T>(T, IEnumerable<T>, IEqualityComparer<T>, String, String, String)
測試指定的集合是否包含指定的項目。
public static void DoesNotContain<T>(T notExpected, System.Collections.Generic.IEnumerable<T> collection, System.Collections.Generic.IEqualityComparer<T> comparer, string? message = "", string notExpectedExpression = "", string collectionExpression = "");
static member DoesNotContain : 'T * seq<'T> * System.Collections.Generic.IEqualityComparer<'T> * string * string * string -> unit
Public Shared Sub DoesNotContain(Of T) (notExpected As T, collection As IEnumerable(Of T), comparer As IEqualityComparer(Of T), Optional message As String = "", Optional notExpectedExpression As String = "", Optional collectionExpression As String = "")
類型參數
- T
收藏品的類型。
參數
- notExpected
- T
意外的物品。
- collection
- IEnumerable<T>
集合。
- comparer
- IEqualityComparer<T>
一個等式比較器用來比較數值。
- message
- String
當斷言失敗時顯示的訊息。
- notExpectedExpression
- String
notExpected 的語法表達式由編譯器透過呼叫者參數表達式所給出。 使用者不應該傳遞這個參數的值。
- collectionExpression
- String
由編譯器透過呼叫者參數表達式所提供的收集語法表達式。 使用者不應該傳遞這個參數的值。
適用於
DoesNotContain<T>(T, Memory<T>, IEqualityComparer<T>, String, String, String)
測試指定的記憶體是否包含指定的項目。
public static void DoesNotContain<T>(T notExpected, Memory<T> collection, System.Collections.Generic.IEqualityComparer<T> comparer, string? message = "", string notExpectedExpression = "", string collectionExpression = "");
static member DoesNotContain : 'T * Memory<'T> * System.Collections.Generic.IEqualityComparer<'T> * string * string * string -> unit
Public Shared Sub DoesNotContain(Of T) (notExpected As T, collection As Memory(Of T), comparer As IEqualityComparer(Of T), Optional message As String = "", Optional notExpectedExpression As String = "", Optional collectionExpression As String = "")
類型參數
- T
記憶物品的種類。
參數
- notExpected
- T
意外的物品。
- collection
- Memory<T>
那段記憶。
- comparer
- IEqualityComparer<T>
一個等式比較器用來比較數值。
- message
- String
當斷言失敗時顯示的訊息。
- notExpectedExpression
- String
notExpected 的語法表達式由編譯器透過呼叫者參數表達式所給出。 使用者不應該傳遞這個參數的值。
- collectionExpression
- String
由編譯器透過呼叫者參數表達式所提供的收集語法表達式。 使用者不應該傳遞這個參數的值。
適用於
DoesNotContain<T>(T, ReadOnlyMemory<T>, IEqualityComparer<T>, String, String, String)
測試指定的記憶體是否包含指定的項目。
public static void DoesNotContain<T>(T notExpected, ReadOnlyMemory<T> collection, System.Collections.Generic.IEqualityComparer<T> comparer, string? message = "", string notExpectedExpression = "", string collectionExpression = "");
static member DoesNotContain : 'T * ReadOnlyMemory<'T> * System.Collections.Generic.IEqualityComparer<'T> * string * string * string -> unit
Public Shared Sub DoesNotContain(Of T) (notExpected As T, collection As ReadOnlyMemory(Of T), comparer As IEqualityComparer(Of T), Optional message As String = "", Optional notExpectedExpression As String = "", Optional collectionExpression As String = "")
類型參數
- T
記憶物品的種類。
參數
- notExpected
- T
意外的物品。
- collection
- ReadOnlyMemory<T>
那段記憶。
- comparer
- IEqualityComparer<T>
一個等式比較器用來比較數值。
- message
- String
當斷言失敗時顯示的訊息。
- notExpectedExpression
- String
notExpected 的語法表達式由編譯器透過呼叫者參數表達式所給出。 使用者不應該傳遞這個參數的值。
- collectionExpression
- String
由編譯器透過呼叫者參數表達式所提供的收集語法表達式。 使用者不應該傳遞這個參數的值。
適用於
DoesNotContain<T>(T, Span<T>, IEqualityComparer<T>, String, String, String)
測試指定區間是否包含指定項目。
public static void DoesNotContain<T>(T notExpected, Span<T> collection, System.Collections.Generic.IEqualityComparer<T> comparer, string? message = "", string notExpectedExpression = "", string collectionExpression = "");
static member DoesNotContain : 'T * Span<'T> * System.Collections.Generic.IEqualityComparer<'T> * string * string * string -> unit
Public Shared Sub DoesNotContain(Of T) (notExpected As T, collection As Span(Of T), comparer As IEqualityComparer(Of T), Optional message As String = "", Optional notExpectedExpression As String = "", Optional collectionExpression As String = "")
類型參數
- T
跨度項目的類型。
參數
- notExpected
- T
意外的物品。
- collection
- Span<T>
跨度。
- comparer
- IEqualityComparer<T>
一個等式比較器用來比較數值。
- message
- String
當斷言失敗時顯示的訊息。
- notExpectedExpression
- String
notExpected 的語法表達式由編譯器透過呼叫者參數表達式所給出。 使用者不應該傳遞這個參數的值。
- collectionExpression
- String
由編譯器透過呼叫者參數表達式所提供的收集語法表達式。 使用者不應該傳遞這個參數的值。
適用於
DoesNotContain<T>(T, Span<T>, String, String, String)
測試指定區間是否包含指定項目。
public static void DoesNotContain<T>(T notExpected, Span<T> collection, string? message = "", string notExpectedExpression = "", string collectionExpression = "");
static member DoesNotContain : 'T * Span<'T> * string * string * string -> unit
Public Shared Sub DoesNotContain(Of T) (notExpected As T, collection As Span(Of T), Optional message As String = "", Optional notExpectedExpression As String = "", Optional collectionExpression As String = "")
類型參數
- T
跨度項目的類型。
參數
- notExpected
- T
意外的物品。
- collection
- Span<T>
跨度。
- message
- String
當斷言失敗時顯示的訊息。
- notExpectedExpression
- String
notExpected 的語法表達式由編譯器透過呼叫者參數表達式所給出。 使用者不應該傳遞這個參數的值。
- collectionExpression
- String
由編譯器透過呼叫者參數表達式所提供的收集語法表達式。 使用者不應該傳遞這個參數的值。
適用於
DoesNotContain<T>(Func<T,Boolean>, Span<T>, String, String, String)
測試指定範圍是否包含與該謂詞相符的元素。
public static void DoesNotContain<T>(Func<T,bool> predicate, Span<T> collection, string? message = "", string predicateExpression = "", string collectionExpression = "");
static member DoesNotContain : Func<'T, bool> * Span<'T> * string * string * string -> unit
Public Shared Sub DoesNotContain(Of T) (predicate As Func(Of T, Boolean), collection As Span(Of T), Optional message As String = "", Optional predicateExpression As String = "", Optional collectionExpression As String = "")
類型參數
- T
跨度項目的類型。
參數
- collection
- Span<T>
跨度。
- message
- String
當斷言失敗時顯示的訊息。
- predicateExpression
- String
謂詞的語法表達式由編譯器透過呼叫者參數表達式給出。 使用者不應該傳遞這個參數的值。
- collectionExpression
- String
由編譯器透過呼叫者參數表達式所提供的收集語法表達式。 使用者不應該傳遞這個參數的值。
適用於
DoesNotContain<T>(T, IEnumerable<T>, String, Object[])
測試指定的集合是否包含指定的項目。
public static void DoesNotContain<T>(T expected, System.Collections.Generic.IEnumerable<T> collection, string? message, params object?[]? parameters);
static member DoesNotContain : 'T * seq<'T> * string * obj[] -> unit
Public Shared Sub DoesNotContain(Of T) (expected As T, collection As IEnumerable(Of T), message As String, ParamArray parameters As Object())
類型參數
- T
收藏品的類型。
參數
- expected
- T
預期中的物品。
- collection
- IEnumerable<T>
集合。
- message
- String
當斷言失敗時顯示的訊息。
- parameters
- Object[]
格式化訊息的參數。
適用於
DoesNotContain<T>(Func<T,Boolean>, ReadOnlyMemory<T>, String, String, String)
測試指定的記憶體是否包含與該謂詞相符的元素。
public static void DoesNotContain<T>(Func<T,bool> predicate, ReadOnlyMemory<T> collection, string? message = "", string predicateExpression = "", string collectionExpression = "");
static member DoesNotContain : Func<'T, bool> * ReadOnlyMemory<'T> * string * string * string -> unit
Public Shared Sub DoesNotContain(Of T) (predicate As Func(Of T, Boolean), collection As ReadOnlyMemory(Of T), Optional message As String = "", Optional predicateExpression As String = "", Optional collectionExpression As String = "")
類型參數
- T
記憶物品的種類。
參數
- collection
- ReadOnlyMemory<T>
那段記憶。
- message
- String
當斷言失敗時顯示的訊息。
- predicateExpression
- String
謂詞的語法表達式由編譯器透過呼叫者參數表達式給出。 使用者不應該傳遞這個參數的值。
- collectionExpression
- String
由編譯器透過呼叫者參數表達式所提供的收集語法表達式。 使用者不應該傳遞這個參數的值。
適用於
DoesNotContain<T>(Func<T,Boolean>, ReadOnlySpan<T>, String, String, String)
測試指定範圍是否包含與該謂詞相符的元素。
public static void DoesNotContain<T>(Func<T,bool> predicate, ReadOnlySpan<T> collection, string? message = "", string predicateExpression = "", string collectionExpression = "");
static member DoesNotContain : Func<'T, bool> * ReadOnlySpan<'T> * string * string * string -> unit
Public Shared Sub DoesNotContain(Of T) (predicate As Func(Of T, Boolean), collection As ReadOnlySpan(Of T), Optional message As String = "", Optional predicateExpression As String = "", Optional collectionExpression As String = "")
類型參數
- T
跨度項目的類型。
參數
- collection
- ReadOnlySpan<T>
跨度。
- message
- String
當斷言失敗時顯示的訊息。
- predicateExpression
- String
謂詞的語法表達式由編譯器透過呼叫者參數表達式給出。 使用者不應該傳遞這個參數的值。
- collectionExpression
- String
由編譯器透過呼叫者參數表達式所提供的收集語法表達式。 使用者不應該傳遞這個參數的值。
適用於
DoesNotContain<T>(Func<T,Boolean>, IEnumerable<T>)
測試指定的集合是否包含指定的項目。
public static void DoesNotContain<T>(Func<T,bool> predicate, System.Collections.Generic.IEnumerable<T> collection);
static member DoesNotContain : Func<'T, bool> * seq<'T> -> unit
Public Shared Sub DoesNotContain(Of T) (predicate As Func(Of T, Boolean), collection As IEnumerable(Of T))
類型參數
- T
收藏品的類型。
參數
- collection
- IEnumerable<T>
集合。
適用於
DoesNotContain<T>(T, IEnumerable<T>)
測試指定的集合是否包含指定的項目。
public static void DoesNotContain<T>(T expected, System.Collections.Generic.IEnumerable<T> collection);
static member DoesNotContain : 'T * seq<'T> -> unit
Public Shared Sub DoesNotContain(Of T) (expected As T, collection As IEnumerable(Of T))
類型參數
- T
收藏品的類型。
參數
- expected
- T
預期中的物品。
- collection
- IEnumerable<T>
集合。
適用於
DoesNotContain<T>(T, IEnumerable<T>, IEqualityComparer<T>)
測試指定的集合是否包含指定的項目。
public static void DoesNotContain<T>(T expected, System.Collections.Generic.IEnumerable<T> collection, System.Collections.Generic.IEqualityComparer<T> comparer);
static member DoesNotContain : 'T * seq<'T> * System.Collections.Generic.IEqualityComparer<'T> -> unit
Public Shared Sub DoesNotContain(Of T) (expected As T, collection As IEnumerable(Of T), comparer As IEqualityComparer(Of T))
類型參數
- T
收藏品的類型。
參數
- expected
- T
預期中的物品。
- collection
- IEnumerable<T>
集合。
- comparer
- IEqualityComparer<T>
一個等式比較器用來比較數值。
適用於
DoesNotContain<T>(T, IEnumerable<T>, String)
測試指定的集合是否包含指定的項目。
public static void DoesNotContain<T>(T expected, System.Collections.Generic.IEnumerable<T> collection, string? message);
static member DoesNotContain : 'T * seq<'T> * string -> unit
Public Shared Sub DoesNotContain(Of T) (expected As T, collection As IEnumerable(Of T), message As String)
類型參數
- T
收藏品的類型。
參數
- expected
- T
預期中的物品。
- collection
- IEnumerable<T>
集合。
- message
- String
當斷言失敗時顯示的訊息。
適用於
DoesNotContain<T>(Func<T,Boolean>, IEnumerable<T>, String)
測試指定的集合是否包含指定的項目。
public static void DoesNotContain<T>(Func<T,bool> predicate, System.Collections.Generic.IEnumerable<T> collection, string? message);
static member DoesNotContain : Func<'T, bool> * seq<'T> * string -> unit
Public Shared Sub DoesNotContain(Of T) (predicate As Func(Of T, Boolean), collection As IEnumerable(Of T), message As String)
類型參數
- T
收藏品的類型。
參數
- collection
- IEnumerable<T>
集合。
- message
- String
當斷言失敗時顯示的訊息。
適用於
DoesNotContain<T>(T, IEnumerable<T>, IEqualityComparer<T>, String)
測試指定的集合是否包含指定的項目。
public static void DoesNotContain<T>(T expected, System.Collections.Generic.IEnumerable<T> collection, System.Collections.Generic.IEqualityComparer<T> comparer, string? message);
static member DoesNotContain : 'T * seq<'T> * System.Collections.Generic.IEqualityComparer<'T> * string -> unit
Public Shared Sub DoesNotContain(Of T) (expected As T, collection As IEnumerable(Of T), comparer As IEqualityComparer(Of T), message As String)
類型參數
- T
收藏品的類型。
參數
- expected
- T
預期中的物品。
- collection
- IEnumerable<T>
集合。
- comparer
- IEqualityComparer<T>
一個等式比較器用來比較數值。
- message
- String
當斷言失敗時顯示的訊息。
適用於
DoesNotContain<T>(Func<T,Boolean>, IEnumerable<T>, String, String, String)
測試指定的集合是否包含指定的項目。
public static void DoesNotContain<T>(Func<T,bool> predicate, System.Collections.Generic.IEnumerable<T> collection, string? message = "", string predicateExpression = "", string collectionExpression = "");
static member DoesNotContain : Func<'T, bool> * seq<'T> * string * string * string -> unit
Public Shared Sub DoesNotContain(Of T) (predicate As Func(Of T, Boolean), collection As IEnumerable(Of T), Optional message As String = "", Optional predicateExpression As String = "", Optional collectionExpression As String = "")
類型參數
- T
收藏品的類型。
參數
- collection
- IEnumerable<T>
集合。
- message
- String
當斷言失敗時顯示的訊息。
- predicateExpression
- String
謂詞的語法表達式由編譯器透過呼叫者參數表達式給出。 使用者不應該傳遞這個參數的值。
- collectionExpression
- String
由編譯器透過呼叫者參數表達式所提供的收集語法表達式。 使用者不應該傳遞這個參數的值。
適用於
DoesNotContain<T>(Func<T,Boolean>, Memory<T>, String, String, String)
測試指定的記憶體是否包含與該謂詞相符的元素。
public static void DoesNotContain<T>(Func<T,bool> predicate, Memory<T> collection, string? message = "", string predicateExpression = "", string collectionExpression = "");
static member DoesNotContain : Func<'T, bool> * Memory<'T> * string * string * string -> unit
Public Shared Sub DoesNotContain(Of T) (predicate As Func(Of T, Boolean), collection As Memory(Of T), Optional message As String = "", Optional predicateExpression As String = "", Optional collectionExpression As String = "")
類型參數
- T
記憶物品的種類。
參數
- collection
- Memory<T>
那段記憶。
- message
- String
當斷言失敗時顯示的訊息。
- predicateExpression
- String
謂詞的語法表達式由編譯器透過呼叫者參數表達式給出。 使用者不應該傳遞這個參數的值。
- collectionExpression
- String
由編譯器透過呼叫者參數表達式所提供的收集語法表達式。 使用者不應該傳遞這個參數的值。
適用於
DoesNotContain<T>(Func<T,Boolean>, IEnumerable<T>, String, Object[])
測試指定的集合是否包含指定的項目。
public static void DoesNotContain<T>(Func<T,bool> predicate, System.Collections.Generic.IEnumerable<T> collection, string? message, params object?[]? parameters);
static member DoesNotContain : Func<'T, bool> * seq<'T> * string * obj[] -> unit
Public Shared Sub DoesNotContain(Of T) (predicate As Func(Of T, Boolean), collection As IEnumerable(Of T), message As String, ParamArray parameters As Object())
類型參數
- T
收藏品的類型。
參數
- collection
- IEnumerable<T>
集合。
- message
- String
當斷言失敗時顯示的訊息。
- parameters
- Object[]
格式化訊息的參數。