public static IEnumerable<Student> FirstNameBeforeLast(Student[] students) { IEnumerable<Student> result = from student in students where student.FirstName.CompareTo(student.LastName) < 0 select student; return result; }
public static IEnumerable<Student> AgeRangeBetween18And24(Student[] students) { IEnumerable<Student> result = from student in students where student.Age >= 18 && student.Age <= 24 select student; return result; }