Requires.NullOrNotNullElements<T>(IEnumerable<T>, String) 方法

定义

如果指定的参数的值不为 null ,并且 具有具有 null 值的元素,则会引发异常。

public:
generic <typename T>
 static void NullOrNotNullElements(System::Collections::Generic::IEnumerable<T> ^ values, System::String ^ parameterName);
[System.Diagnostics.DebuggerStepThrough]
public static void NullOrNotNullElements<T> (System.Collections.Generic.IEnumerable<T>? values, string parameterName);
[<System.Diagnostics.DebuggerStepThrough>]
static member NullOrNotNullElements : seq<'T> * string -> unit
Public Shared Sub NullOrNotNullElements(Of T) (values As IEnumerable(Of T), parameterName As String)

类型参数

T

序列中元素的类型。

参数

values
IEnumerable<T>

参数的值。

parameterName
String

要包含在任何引发的异常中的参数的名称。

属性

例外

在测试的条件为 false 时引发。

适用于