private static IEnumerable<Students> YoungStudents(Students[] collection, int startAge, int endAge) { var sorted = collection.Where(st => st.Age >= startAge && st.Age <= endAge); return sorted; }
private static IEnumerable<Students> FirstNameBeforeLast(Students[] collection) { var sorted = collection.OrderBy(x => x.FirstName.CompareTo(x.LastName) < 0); return sorted; }