csharp string ends with

Code Example - csharp string ends with

                
                        string x = "Test1234";
Console.WriteLine(x.EndsWith("1234")); 

//Output: true

string y = "Test1234 test2";
Console.WriteLine(y.EndsWith("test2")); 

//Output: true