using System; using System.Collections.Generic; using System.Linq; class Company { public Company(List users) { this.Users = users; } public List Users { get; set; } } class User { public User(string name) { this.Name = name; } public string Name { get; set; } } class Program { static void Main(string[] args) { List companies = new List(); Company company1 = new Company(new List(){ new User("first user"), new User("second user") }); Company company2 = new Company(new List() { new User("third user"), new User("fourth user") }); companies.Add(company1); companies.Add(company2); companies = companies .Where(company => company.Users.Any(user => user.Name.Contains("third"))) .ToList(); foreach (Company company in companies) { Console.WriteLine(string.Join(", ", company.Users.Select(user => user.Name).ToArray())); } } }