I have a class with a DateTimeOffset property:
public class Sample
{
public DateTimeOffset expires { get; set; }
}
and eventually a collection of them:
IEnumerable<Sample> collection;
2 questions:
What is the best way to create a method that returns all the Sample items from the collection where expires is greater than now and is still today (ie before midnight)?
What is the best way to return all Sample items from the collection where expires is in the next 24 hours?