title: Validating a date to be within the SqlDbType.DateTime range
body: <p>I want to validate a System.DateTime value before I add it as a parameter to my SqlCommand instance.</p>
  
  <p>The MSDN documentation for the SqlDbType enumeration says:</p>
  
  <p><strong>Date and time data ranging in value from January 1, 1753 to December 31, 9999 to an accuracy of 3.33 milliseconds.</strong></p>
  
  <p>To validate the value, I'm using</p>
  
  <pre><code>public readonly DateTime SqlDateTimeMin = new DateTime(1753, 1, 1);
  public readonly DateTime SqlDateTimeMax = new DateTime(9999, 12, 31);
  
  if (value &lt; SqlDateTimeMin || value &gt; SqlDateTimeMax)
      // Validation check fails
  else
      // Validation check succeeds
  </code></pre>
  
  <p>Is this the best way?  Is there an alternative to hard coding these min and max values?</p>