Student{ First { ; ; } Last {; ;} ID { ; ; } Street { ; ; } City { ; ; } List<> Scores;} Teacher{ First { ; ; } Last { ; ; } ID { ; ; } City { ; ; }} DataTransformations{ Main() { List<Student> students = List<Student>() { Student {First=, Last=, ID=111, Street=, City=, Scores= List<> {97, 92, 81, 60}}, Student {First=, Last=, ID=112, Street=, City=, Scores= List<> {75, 84, 91, 39}}, Student {First=, Last=, ID=113, Street=, City=, Scores= List<> {88, 94, 65, 91}}, }; List<Teacher> teachers = List<Teacher>() { Teacher {First=, Last=, ID=945, City = }, Teacher {First=, Last=, ID=956, City = }, Teacher {First=, Last=, ID=972, City = } }; peopleInSeattle = ( student students student.City == student.Last) .Concat( teacher teachers teacher.City == teacher.Last); Console.WriteLine(); ( person peopleInSeattle) { Console.WriteLine(person); } Console.WriteLine(); Console.ReadKey(); }} |