using System.Collections.Generic;
public DateTime SomeDate;
public string SomeString;
public override string ToString()
return $"{SomeString}: {SomeDate}";
public static void Main()
var L = new List<List<myclass>>();
List<myclass> t = new List<myclass>();
var mc = new myclass() { SomeString = "5", SomeDate = DateTime.Now };
myclass mc1 = new myclass() { SomeString = "12", SomeDate = DateTime.Now.AddDays(1) };
myclass mc2 = new myclass() { SomeString = "123", SomeDate = DateTime.Now.AddDays(2) };
myclass mc3 = new myclass() { SomeString = "77", SomeDate = DateTime.Now.AddDays(3) };
myclass mc4 = new myclass() { SomeString = "882", SomeDate = DateTime.Now.AddDays(4) };
List<myclass> t2 = new List<myclass>();
myclass mc5 = new myclass() { SomeString = "166", SomeDate = DateTime.Now.AddDays(500) };
myclass mc6 = new myclass() { SomeString = "344", SomeDate = DateTime.Now.AddDays(501) };
myclass mc7 = new myclass() { SomeString = "123", SomeDate = DateTime.Now.AddDays(502) };
myclass mc8 = new myclass() { SomeString = "234", SomeDate = DateTime.Now.AddDays(503) };
myclass mc9 = new myclass() { SomeString = "123", SomeDate = DateTime.Now.AddDays(504) };
var date = DateTime.Now.AddDays(502).Date;
var result = L.Where(list => list.Any(x => x.SomeString == target1 && x.SomeDate.Date == date)).FirstOrDefault();
.Select(list => list.Where(x => x.SomeString == target1 && x.SomeDate.Date == date).ToList())
.Where(list => list.Any())
Console.WriteLine("Approach #1");
for(int i = 0; i < result.Count; i++)
Console.WriteLine($"Object#{i+1}: {string.Join(",", result[i])}");
Console.WriteLine("Approach #2");
for(int i = 0; i < result2.Count; i++)
Console.WriteLine($"List#{i+1}: {string.Join(",", result2[i])}");