I have a class as following:
public class Wrapper
{
public Wrapper();
public Class1 c1 { get; set; }
public List<Class2> lstC2 { get; set; }
}
where Class2 is :
public class Class2
{
public DateTime date1 { get; set; }
}
and I get the list of objects of Wrapper class by some method
List<Wrapper> lstWrap = SomeMethod();
Now I want to remove All the records from lstWrap where date1 is less than today for any record in lstC2 using lambda expression. I tried using RemoveAll function but could not meet the results.
Thank You.
in these situations I would use .All() or .Any()
EDIT:
To remove all I would still use the .Any()