title: Can I cast from DBNull to a Nullable Bool in one line?
body: <p>I have a database query which will either return <code>NULL</code> or a boolean (bit) value.</p>
  
  <p>I wish to store this value in a variable of type <code>Nullable&lt;bool&gt;</code> in C#.</p>
  
  <p>I can't seem to find an acceptable mix of explict casts and conversions that do this in a simple way without Exceptions being thrown.</p>
  
  <p>Can it be done in one readable line?</p>
  
  <p><strong>EDIT:</strong> Code as requested</p>
  
  <pre><code>private Nullable&lt;bool&gt; IsRestricted;
  ...//data access
  IsRestricted = (bool?)DataBinder.GetPropertyValue(dataObj, "IsRestricted");
  </code></pre>
  
  <p>or perhaps</p>
  
  <pre><code>IsRestricted = (bool?)(bool)DataBinder.GetPropertyValue(dataObj, "IsRestricted");
  </code></pre>