Just a short question out of curiosity.
string str = \"string\"; Console.WriteLine(str.EndsWith(string.Empty)); //true Console.WriteLine(st
Try this:
string str = "string"; Console.WriteLine(str.EndsWith(string.Empty)); //true Console.WriteLine(str.LastIndexOf(string.Empty) == str.Length-1); // true Console.ReadLine();
So yes as Oded said, they do always match.