I have a method that returns an IEnumerable of this type:
public class ProductUpdate
{
public string ProductId { get; set; }
public DateTime DueDateTime { get; set; }
}
and I have a
List<string>
which has a list of dates as strings.
What I am trying to do is check for any Product that has a DueDate value which matches an item in the List of strings. Remove it if there is a match.
Ex:
Let's say a ProductUpdate item, PU1, in the IEnumerable has a DueDate 06/07/2015 and the List of strings contains 60/07/2015, then remove PU1 from the IEnumerable collection.
I could get it done using a foreach but am looking at a solution with LINQ.
Thanks in advance.