title: LINQ get objects by date interval
body: <p>I'm looking for a LINQ query that will select only those objects whose date interval is not higher than 20 seconds. For example:</p>
  
  <pre><code>AuthenticationEssay[] essays = new AuthenticationEssay[] {
      new AuthenticationEssay() { Date = DateTime.Now.AddSeconds(20), Success = false },
      new AuthenticationEssay() { Date = DateTime.Now.AddSeconds(24), Success = false },
      new AuthenticationEssay() { Date = DateTime.Now.AddSeconds(29), Success = false },
      new AuthenticationEssay() { Date = DateTime.Now.AddSeconds(38), Success = false },
      new AuthenticationEssay() { Date = DateTime.Now.AddSeconds(125), Success = false },
      new AuthenticationEssay() { Date = DateTime.Now.AddSeconds(347), Success = false },
      new AuthenticationEssay() { Date = DateTime.Now.AddSeconds(400), Success = false },
      new AuthenticationEssay() { Date = DateTime.Now.AddSeconds(422), Success = false },
      new AuthenticationEssay() { Date = DateTime.Now.AddSeconds(446), Success = false },
      new AuthenticationEssay() { Date = DateTime.Now.AddSeconds(467), Success = false }
  };
  </code></pre>
  
  <p>I want to select only the first occurence of those objects whose date interval is not longer than 20 seconds against the next object. In this case, the query should return only the first 4 objects. Any idea? :(</p>
  
  <p>UPDATE</p>
  
  <p>Sorry, I forgot to mention that I'm sorting the array by descending order. So yes, the position in the array shouldn't have any effect on the query.</p>