title: How to check if any cookies are expired in the cookiecontainer?
body: <p>I've got a dependency in my class:</p>
  
  <pre><code>    private static CookieContainer _cookieContainer;
  </code></pre>
  
  <p>I would like to iterate through all the cookies, and then if one of them is expired, I would like to run my code to reauthenticate</p>
  
  <p>The pseudo-code would look something like this:</p>
  
  <pre><code>foreach(var cookie in _cookieContainer)
  {
      if (cookie.IsExpired)
      {
          ReAuthenticate();
          break;
      }
  }
  </code></pre>
  
  <p><strong>How do I iterate over every cookie and check whether it is expired?</strong></p>