StringExtensionsContainsAny(String, StringComparison, String) Method

Gets whether the specified String s contains any of the strings in the specified set set using a specific comparison.


Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.1.0
public static bool ContainsAny(
	this string s,
	StringComparison comparison,
	params string[] set


s  String
A String instance that is to be compared to each element of the set.
comparison  StringComparison
The StringComparison to use.
set  String
A string array

Return Value

if string s contains any of the elements of set; otherwise, .

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type String. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).


ArgumentNullExceptions is
set is .
ArgumentOutOfRangeExceptioncomparison is not a defined StringComparison value.
ArgumentExceptionsetcontains a element.

See Also