title: Nullable DateTimes and the AddDays() extension
body: <p>I have a DateTime variable that can either be null or a Datetime. I figured a nullable DateTime type would work, but I am getting an error telling me that said </p>
  
  <blockquote>
    <p><code>Nullable&lt;DateTime&gt;</code> does not have a definition for AddDays</p>
  </blockquote>
  
  <p>. Is there any way to resolve this error?</p>
  
  <pre><code>DateTime? lastInvite = (DateTime?)Session["LastInviteSent"];
  
  if ((string)Session["InviteNudgeFlag"] == "False" &amp;&amp; ((lastInvite == null &amp;&amp; DateTime.Now &gt;= AcctCreation.AddDays(7)) || (int)Session["InviteCount"] &gt; 0 &amp;&amp; DateTime.Now &gt;= lastInvite.AddDays(7)))
  {
     // Non important code here
  }
  </code></pre>