Requires.NotNullOrWhiteSpace(String, String) 方法

定义

如果指定参数的值为 null、空或空白,则引发异常。

public:
 static void NotNullOrWhiteSpace(System::String ^ value, System::String ^ parameterName);
[System.Diagnostics.DebuggerStepThrough]
public static void NotNullOrWhiteSpace (string value, string? parameterName);
[<System.Diagnostics.DebuggerStepThrough>]
static member NotNullOrWhiteSpace : string * string -> unit
Public Shared Sub NotNullOrWhiteSpace (value As String, parameterName As String)

参数

value
String

参数的值。

parameterName
String

要包含在任何引发的异常中的参数的名称。

属性

例外

如果 valuenull 或为空,则引发。

适用于