StringStartsWith Method (String, StringComparison) |
Determines whether the beginning of this string instance matches the specified string when compared using the specified comparison option.
Namespace: SystemAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public bool StartsWith(
string value,
StringComparison comparisonType
)
Parameters
- value
- Type: SystemString
The string to compare. - comparisonType
- Type: SystemStringComparison
One of the enumeration values that determines how this string and value are compared.
Return Value
Type:
Booleantrue if this instance begins with
value; otherwise, false.
Exceptions See Also