StringExtensionsContains Method

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


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


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

Return Value

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).


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

See Also