StringEndsWith Method (String, StringComparison) |
Determines whether the end 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 EndsWith(
string value,
StringComparison comparisonType
)
Parameters
- value
- Type: SystemString
The string to compare to the substring at the end of this instance. - comparisonType
- Type: SystemStringComparison
One of the enumeration values that determines how this string and value are compared.
Return Value
Type:
Booleantrue if the
value parameter matches the end of this string; otherwise, false.
Exceptions See Also