using System.Collections.Generic;
public string Name { get; set; }
public List<DateTime> VacationDays { get; set; }
public static void Main()
var people = new List<Person>
VacationDays = new List<DateTime>
DateTime.Parse("1/1/2019"),
DateTime.Parse("1/2/2019")
VacationDays = new List<DateTime>
DateTime.Parse("1/1/2019"),
DateTime.Parse("1/3/2019")
var flatList = people.SelectMany
p => p.VacationDays.Select( d => new { Person = p, Date = d } )
Console.WriteLine("Flat list:");
foreach (var entry in flatList)
Console.WriteLine("{0} has the day off on {1:MM/dd/yyyy}", entry.Person.Name, entry.Date);
var lookFor = DateTime.Parse("1/1/2019");
var entriesForJan01 = flatList.Where( f => f.Date == lookFor );
Console.WriteLine("People with a vacation on 1/1/2019:");
foreach (var entry in entriesForJan01)
Console.WriteLine("{0} has the day off on {1:MM/dd/yyyy}", entry.Person.Name, entry.Date);