title: Comparing DateTime with SqlDateTime.MinValue
body: <p>When I compare a DateTime variable with SqlDateTime.MinValue:</p>
  
  <pre><code>if (StartDate &gt; SqlDateTime.MinValue)
  {
    // some code
  }
  </code></pre>
  
  <p>I get the following runtime exception if StartDate is &lt; SqlDateTime.MinValue:</p>
  
  <blockquote>
    <p>SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and
    12/31/9999 11:59:59 PM.</p>
  </blockquote>
  
  <p>This can be easy solved with a small change:</p>
  
  <pre><code>if (StartDate &gt; SqlDateTime.MinValue.Value)
  {
    // some code
  }
  </code></pre>
  
  <p>I understand that in the first code snippet I'm comparing apples to oranges. What I don't understand is the exception message. It seems like I'm assigning a DateTime value to a SqlDateTime variable.</p>
  
  <p>What am I missing?</p>