다음을 통해 공유


Requires.NotNullEmptyOrNullElements<T> 메서드

정의

지정된 매개 변수의 값이 null이거나, 요소가 없거나, null 값이 있는 요소가 있는 경우 예외를 throw합니다.

public:
generic <typename T>
 where T : class static void NotNullEmptyOrNullElements(System::Collections::Generic::IEnumerable<T> ^ values, System::String ^ parameterName);
[System.Diagnostics.DebuggerStepThrough]
public static void NotNullEmptyOrNullElements<T>(System.Collections.Generic.IEnumerable<T> values, string? parameterName) where T : class;
[System.Diagnostics.DebuggerStepThrough]
public static void NotNullEmptyOrNullElements<T>(System.Collections.Generic.IEnumerable<T> values, string? parameterName = default) where T : class;
[<System.Diagnostics.DebuggerStepThrough>]
static member NotNullEmptyOrNullElements : seq<'T (requires 'T : null)> * string -> unit (requires 'T : null)
Public Shared Sub NotNullEmptyOrNullElements(Of T As Class) (values As IEnumerable(Of T), parameterName As String)
Public Shared Sub NotNullEmptyOrNullElements(Of T As Class) (values As IEnumerable(Of T), Optional parameterName As String = Nothing)

형식 매개 변수

T

시퀀스의 요소 형식입니다.

매개 변수

values
IEnumerable<T>

인수 값입니다.

parameterName
String

throw된 예외에 포함할 매개 변수의 이름입니다. 이 인수를 생략하면(명시적으로 쓰기 null 가 적합하지 않음) 첫 번째 인수에 사용된 식이 매개 변수 이름으로 사용됩니다.

특성

예외

테스트된 조건이 false이면 throw됩니다.

적용 대상