Table of Contents

EqualsAny Method

Definition

Namespace
Cuemon.Extensions
Assemblies
Cuemon.Extensions.Core.dll
Source
src/Cuemon.Extensions.Core/StringExtensions.cs

EqualsAny(string, params string[])

Returns a value indicating the specified value equals one of the specified values.

public static bool EqualsAny(this string value, params string[] values)

Parameters

value string

The string to extend.

values string[]

The string sequence to search within value.

Returns

bool

true if one the values is the same as the value; otherwise false.

Remarks

This method performs an ordinal (case-sensitive and culture-insensitive) comparison. The search begins at the first character position of this string and continues through the last character position.

Exceptions

ArgumentNullException

value is null - or - values is null.

EqualsAny(string, StringComparison, params string[])

Returns a value indicating the specified value equals one of the specified values.

public static bool EqualsAny(this string value, StringComparison comparison, params string[] values)

Parameters

value string

The string to extend.

comparison StringComparison

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

values string[]

The string sequence to search within value.

Returns

bool

true if one the values is the same as the value; otherwise false.