class Student { public string class{get;set;} public Enumerable<book> subjects{get;set;} } class Book{ public string language{get;set;} public string science{get;set;} }
var lang= students.Select(i => new { i.class, i.subjects}).Select(j => j.subjects.Where(k => k.language.ToLower() == "english".ToLower()));
//returns students having a specific language book var langStudents = students.Where(s => s.subjects.Any(x => s.Language.ToLower() == lang)); return langStudents; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)