How to find employees whose names start and end with the same?
How to find employees whose names start and end with the same
letter?
var filtered = employees
.Where(e => e.Name.StartsWith(e.Name.Last().ToString(),
StringComparison.OrdinalIgnoreCase));
foreach (var emp in filtered)
Console.WriteLine(emp.Name);