title: Comparing against list of dates
body: <p>Have a small problem with LINQ queries.</p>
  
  <p>Basically I have two lists, filled with dates.</p>
  
  <pre><code>List&lt;DateTime&gt; start = GetListOfStartDates();
  List&lt;DateTime&gt; end = GetListOfEndDates();
  DateTime date = new DateTime(2012, 1, 1);
  </code></pre>
  
  <p>How do I perform a LINQ query, where I compare a date against the start and end date, basically in sense: </p>
  
  <pre><code>(start &lt;= date &amp;&amp; end &gt;= date)
  </code></pre>
  
  <p>Obviously I understand that they are lists, so this does not work, how do I compare a single date against two lists of dates? Basically doing a between for a set of dates.</p>
  
  <p>The start indices will always match end indices, <code>start[7]</code> will always match <code>end[7]</code>. I'm attempting to turn a mysql <code>between</code>-query into LINQ. So I'm looking for IF the given "date" is within any start-end pair.</p>