Requires.NotNullOrWhiteSpace(String, 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 null, empty, or whitespace.
public:
static void NotNullOrWhiteSpace(System::String ^ value, System::String ^ parameterName);
[System.Diagnostics.DebuggerStepThrough]
public static void NotNullOrWhiteSpace (string value, string? parameterName);
[System.Diagnostics.DebuggerStepThrough]
public static void NotNullOrWhiteSpace (string value, string? parameterName = default);
[<System.Diagnostics.DebuggerStepThrough>]
static member NotNullOrWhiteSpace : string * string -> unit
Public Shared Sub NotNullOrWhiteSpace (value As String, parameterName As String)
Public Shared Sub NotNullOrWhiteSpace (value As String, Optional parameterName As String = Nothing)
Parameters
- value
- String
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 value
is null
or empty.