I have a collection of periods [FromDate, ToDate]
.
I would know whether there is any overlap between a given period and the periods in the collection.>
Approach it this way instead: There is no intersaction if the check date's todate < the from date, or the check date's fromdate > the to date. This is assuming check.from <= check.to.
Periods.Any(p => !(check.ToDate < p.FromDate || check.FromDate > p.ToDate));
or (after unwrapping the negative):
Periods.Any(p => check.ToDate >= p.FromDate && check.FromDate <= p.ToDate));