• Api Documentation
Show / Hide Table of Contents
  • Ubiquity.NET.ArgValidators
    • ValidatedNotNullAttribute
    • Validators
      • ValidateDefined
      • ValidateLength
      • ValidateNotDefault
      • ValidateNotNull
      • ValidateNotNullOrWhiteSpace
      • ValidatePattern
      • ValidateRange

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

System.String value

string to test.

System.String paramName

Name of the parameter for the exception if the value is or whitespace.

Returns

System.String

value for fluent design usage.

Remarks

This validation provides a distinct exception or exception message depending on the input value.

Exceptions

System.ArgumentNullException

If value is .

System.ArgumentException

If the string is empty or all whitespace (System.Exception.Message message will indicate which condition triggered the exception).

Back to top Copyright (C) 2017-2021, Ubiquity.NET Contributors
Build: 7.0.0