ThrowIfArgumentNull<T> Method
- Last UpdatedAug 21, 2026
- 1 minute read
Throws if argument is null.
'Declaration
Public Shared Sub ThrowIfArgumentNull(Of T As Class)( _
ByVal argument As T, _
ByVal argumentName As String _
)
public static void ThrowIfArgumentNull<T>(
T argument,
string argumentName
)
where T: class
public:
static void ThrowIfArgumentNullgeneric<typename T>
(
T^ argument,
String^ argumentName
)
where T: ref class
Parameters
- argument
- The argument.
- argumentName
- Name of the argument.
Type Parameters
- T
- type
| Exception | Description |
|---|---|
| System.ArgumentNullException | throws an instance of ArgumentNullException |