Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 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;
 }