Click or drag to resize
StringEndsWith Method (String, StringComparison)
Determines whether the end of this string instance matches the specified string when compared using the specified comparison option.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
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: Boolean
true if the value parameter matches the end of this string; otherwise, false.
Exceptions
ExceptionCondition
ArgumentNullExceptionvalue is null.
ArgumentExceptioncomparisonType is not a StringComparison value.
See Also