Throw.IfArgumentNullOrEmpty(String, 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 ArgumentNullException or ArgumentException with the given parameter name and optional message if the given string is null or empty, respectively.
public static void IfArgumentNullOrEmpty (string value, string paramName, string message = default);
static member IfArgumentNullOrEmpty : string * string * string -> unit
Public Shared Sub IfArgumentNullOrEmpty (value As String, paramName As String, Optional message As String = Nothing)
Parameters
- value
- String
The string to test for null or empty.
- paramName
- String
The name of the parameter being validated. This is passed to the ArgumentNullException or ArgumentException constructor.
- message
- String
An optional error message to include in the ArgumentNullException or ArgumentException.
Applies to
Azure SDK for .NET