Share via


CodeContract.RequiresArgumentNotNull<T>(T, String) Method

Definition

Requires that argument is not null

public:
generic <typename T>
 where T : class[System::Runtime::CompilerServices::Extension]
 static void RequiresArgumentNotNull(T value, System::String ^ argumentName);
public static void RequiresArgumentNotNull<T> (this T value, string argumentName) where T : class;
static member RequiresArgumentNotNull : 'T * string -> unit (requires 'T : null)
<Extension()>
Public Sub RequiresArgumentNotNull(Of T As Class) (value As T, argumentName As String)

Type Parameters

T

type of argument

Parameters

value
T

Value

argumentName
String

string representation of the argument

Applies to