Dev2.VerifyArgument.IsNotNullOrWhitespace C# (CSharp) Method

IsNotNullOrWhitespace() public static method

Verifies that the given string is not null, empty or whitespace.
public static IsNotNullOrWhitespace ( [ name, string value ) : void
name [ The argument name.
value string The value.
return void
        public static void IsNotNullOrWhitespace([NotNull]string name, string value) {
            if(string.IsNullOrWhiteSpace(value) || string.IsNullOrEmpty(value))
            {
                throw new ArgumentNullException(name, "The argument must not be null or empty and must contain non-whitespace characters must");
            }
         }
    }