System.String.Contains Method

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

Syntax

public bool Contains (string value)

Parameters

value
The string to seek.

Returns

true if the value parameter occurs within this string, or if value is the empty string (""); 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.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0