Click or drag to resize

ExtensionsContains Method

Returns a value indicating whether a specified substring occurs within this string.

Namespace:  Cauldron
Assembly:  Cauldron (in Cauldron.dll) Version: 3.2.0.1 (3.2.0.1)
Syntax
C#
public static bool Contains(
	this string text,
	string value,
	StringComparison comparisonType
)

Parameters

text
Type: SystemString
The string to seek from.
value
Type: SystemString
The string to seek.
comparisonType
Type: SystemStringComparison
One of the enumeration values that specifies the rules for the search.

Return Value

Type: Boolean
True if the value parameter occurs within this string, or if value is the empty string (""); otherwise, false.

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