StringExtensionsContains Method

Gets whether the specified string s contains the specified value using the specified comparison.

Definition

Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.0.0
C#
public static bool Contains(
	this string s,
	string value,
	StringComparison comparison
)

Parameters

s  String
A String instance in which value is searched.
value  String
The String to seek.
comparison  StringComparison
The StringComparison to use.

Return Value

Boolean
if string s contains value; 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).

Exceptions

ArgumentNullExceptions is
-or-
value is .
ArgumentOutOfRangeExceptioncomparison is not a defined StringComparison value.

See Also