StringAssert.StartsWith 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
StartsWith() |
Tests whether the specified string begins with the specified substring and throws an exception if the test string does not start with the substring. |
StartsWith() |
Tests whether the specified string begins with the specified substring and throws an exception if the test string does not start with the substring. |
StartsWith()
Tests whether the specified string begins with the specified substring and throws an exception if the test string does not start with the substring.
public:
static void StartsWith(System::String ^ value, System::String ^ substring, StringComparison comparisonType);
public static void StartsWith (string value, string substring, StringComparison comparisonType);
static member StartsWith : string * string * StringComparison -> unit
Public Shared Sub StartsWith (value As String, substring As String, comparisonType As StringComparison)
Exceptions
Thrown if value
does not begin with
substring
.
Applies to
StartsWith()
Tests whether the specified string begins with the specified substring and throws an exception if the test string does not start with the substring.
public:
static void StartsWith(System::String ^ value, System::String ^ substring, System::String ^ message, StringComparison comparisonType, ... cli::array <System::Object ^> ^ parameters);
public static void StartsWith (string value, string substring, string message, StringComparison comparisonType, params object[] parameters);
static member StartsWith : string * string * string * StringComparison * obj[] -> unit
Public Shared Sub StartsWith (value As String, substring As String, message As String, comparisonType As StringComparison, ParamArray parameters As Object())
Exceptions
Thrown if value
does not begin with
substring
.