Method ValidateNotNullOrWhiteSpace
ValidateNotNullOrWhiteSpace(String, String)
Validates a parameter string is not null or white space.
Declaration
public static string ValidateNotNullOrWhiteSpace(this string value, string paramName)
Parameters
public static string ValidateNotNullOrWhiteSpace(this string value, string paramName)
| System.String | value | string to test. |
| System.String | paramName | Name of the parameter for the exception if the |
Returns
| System.String |
|
Remarks
This validation provides a distinct exception or exception message depending on the input value.
Exceptions
| System.ArgumentNullException | If |
| System.ArgumentException | If the string is empty or all whitespace (System.Exception.Message message will indicate which condition triggered the exception). |