StringAssert.Contains Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Contains() |
Tests whether the specified string contains the specified substring and throws an exception if the substring does not occur within the test string. |
Contains() |
Tests whether the specified string contains the specified substring and throws an exception if the substring does not occur within the test string. |
Contains()
Tests whether the specified string contains the specified substring and throws an exception if the substring does not occur within the test string.
public:
static void Contains(System::String ^ value, System::String ^ substring, System::String ^ message, StringComparison comparisonType);
public static void Contains (string value, string substring, string message, StringComparison comparisonType);
static member Contains : string * string * string * StringComparison -> unit
Public Shared Sub Contains (value As String, substring As String, message As String, comparisonType As StringComparison)
Exceptions
Thrown if substring
is not found in
value
.
Applies to
Contains()
Tests whether the specified string contains the specified substring and throws an exception if the substring does not occur within the test string.
public:
static void Contains(System::String ^ value, System::String ^ substring, StringComparison comparisonType);
public static void Contains (string value, string substring, StringComparison comparisonType);
static member Contains : string * string * StringComparison -> unit
Public Shared Sub Contains (value As String, substring As String, comparisonType As StringComparison)
Exceptions
Thrown if substring
is not found in
value
.