Table of Contents

ThrowIfNotContainsAny Method

Definition

Namespace
Cuemon
Assemblies
Cuemon.Kernel.dll
Source
src/Cuemon.Kernel/Validator.cs

ThrowIfNotContainsAny(string, char[], StringComparison, string, string)

Validates and throws an ArgumentOutOfRangeException if any of the characters does not occur within the argument.

public static void ThrowIfNotContainsAny(string argument, char[] characters, StringComparison comparison = StringComparison.OrdinalIgnoreCase, string message = "No matching characters were found.", string paramName = null)

Parameters

argument string

The value to be evaluated.

characters char[]

The sequence of char to search within argument.

comparison StringComparison

One of the enumeration values that specifies the rules to use in the comparison.

message string

The message that describes the error.

paramName string

The name of the parameter that caused the exception.

Exceptions

ArgumentOutOfRangeException

argument does not contain any of the specified characters.