Home » C# String EndsWith() method

C# String EndsWith() method

by Online Tutorials Library

C# String EndsWith()

The C# EndsWith() method is used to check whether the specified string matches the end of this string or not. If the specified string is found at the end of this string, it returns true otherwise false.

Signature

Parameters

str: it is a string object which is used to check the whether a specified string ends with it.

Return

It returns boolean value either true or false.


C# String EndsWith() Method Example

Output:

True False  
Next TopicC# String Equals()

You may also like