title: Querying a Nullable bool in C#
body: <p>I've come across a curious problem with the following code. It compiles fine although <a href="http://www.jetbrains.com/resharper/" rel="nofollow">Resharper</a> highlights the code segment <code>(autorefresh == null)</code>, notifying me <em>Expression is always false</em></p>
  
  
  
  <pre class="lang-c# prettyprint-override"><code>bool? autorefresh = Properties.Settings.Default.autorefresh;
  autorefresh = (autorefresh == null) ? false : autorefresh;
  Enabled = (bool)autorefresh;
  </code></pre>
  
  <p>Any ideas how better to get around this problem?</p>
  
  <p><strong>Edit 07/02/2012 16:52</strong></p>
  
  <pre class="lang-c# prettyprint-override"><code>Properties.Settings.Default.autorefresh
  </code></pre>
  
  <p>The above is a <code>bool</code>, not a <code>string</code>.</p>