title: C# list where items have a TTL
body: <p>For sake of a simple example, I'd like to have a list of strings.  Each item in the list should "expire" 5 minutes after adding it to the list.  Although there may not be an easy, built-in way to do this, I'd like to end up with a data structure whose API feels like it "just works".</p>
  
  <p>You might use it as follows:</p>
  
  <pre><code>var now = DateTime.now();
  var list = new ListWithTTL&lt;string&gt;();
  list.add("Bob", now);
  list.add("Joe", now.AddMinutes(1));
  list.add("Tom", now.AddMinutes(2));
  list.add("Tim", now.AddMinutes(2));
  </code></pre>
  
  <p>Inspecting elements immediately would yield</p>
  
  <pre><code>["Bob", "Joe", "Tom", "Tim"]
  </code></pre>
  
  <p>A few minutes later it should yield</p>
  
  <pre><code>["Tom", "Tim"]
  </code></pre>
  
  <p>Eventually the list should be empty.</p>