Requires.NullOrNotNullElements<T>(IEnumerable<T>, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Throws an exception if the specified parameter's value is not null and has an element with a null value.
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]
public static void NullOrNotNullElements<T> (System.Collections.Generic.IEnumerable<T> values, string? parameterName = default);
[<System.Diagnostics.DebuggerStepThrough>]
static member NullOrNotNullElements : seq<'T> * string -> unit
Public Shared Sub NullOrNotNullElements(Of T) (values As IEnumerable(Of T), parameterName As String)
Public Shared Sub NullOrNotNullElements(Of T) (values As IEnumerable(Of T), Optional parameterName As String = Nothing)
Type Parameters
- T
The type of the elements in the sequence.
Parameters
- values
- IEnumerable<T>
The value of the argument.
- parameterName
- String
The name of the parameter to include in any thrown exception. If this argument is omitted (explicitly writing null
does not qualify), the expression used in the first argument will be used as the parameter name.
- Attributes
Exceptions
Thrown if the tested condition is false.