I have the following class:
public class Membership { public DateTime StartDate { get; set; } public DateTime? EndDate { get; set; } // If null then
A condition like this should do the trick:
newItem.StartDate <= range.EndDate && newItem.EndDate.HasValue && newItem.EndDate >= range.StartDate