ThrowIfArgumentNullOrWhiteSpace Method
- Last UpdatedAug 21, 2026
- 1 minute read
Throws if argument is null or white space.
'Declaration
Public Shared Sub ThrowIfArgumentNullOrWhiteSpace( _
ByVal argument As String, _
ByVal argumentName As String _
)
public static void ThrowIfArgumentNullOrWhiteSpace(
string argument,
string argumentName
)
public:
static void ThrowIfArgumentNullOrWhiteSpace(
String^ argument,
String^ argumentName
)
Parameters
- argument
- The argument.
- argumentName
- Name of the argument.
| Exception | Description |
|---|---|
| System.ArgumentNullException | throws an instance of ArgumentNullException |
| System.ArgumentException | Value must not be empty or only whitespace. |