System.String.EndsWith Method

Determines whether the end of this string instance matches the specified string when compared using the specified culture.


public bool EndsWith (string value, bool ignoreCase, System.Globalization.CultureInfo culture)


The string to compare to the substring at the end of this instance.
true to ignore case during the comparison; otherwise, false.
Cultural information that determines how this instance and value are compared. If culture is null, the current culture is used.


true if the value parameter matches the end of this string; otherwise, false.


This method compares the value parameter to the substring at the end of this string that is the same length as value, and returns a value that indicates whether they are equal. To be equal, value must be a reference to this same instance or match the end of this string.

This method performs a word (culture-sensitive) comparison using the specified casing and culture.


Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions:,
Since: .NET 2.0