ThrowIfWhiteSpace Method
Definition
ThrowIfWhiteSpace(string, string, string)
Validates and throws an ArgumentException if the specified argument consist only of white-space characters.
public static void ThrowIfWhiteSpace(string argument, string message = "Value cannot consist only of white-space characters.", string paramName = null)
Parameters
argumentstringThe value to be evaluated.
messagestringA message that describes the error.
paramNamestringThe name of the parameter that caused the exception.
Remarks
This method will not throw an exception if argument is null.
Exceptions
- ArgumentException
argumentcannot consist only of white-space characters.