title: Using return and short-hand if in C#
body: <p>Why wouldn't the following line of code work in a method?</p>
  
  <pre><code>return (count &gt; 0) ? true : false;
  </code></pre>
  
  <p>It works perfectly fine if I do:</p>
  
  <pre><code>bool ret = (count &gt; 0) ? true : false;
  return ret;
  </code></pre>
  
  <p><strong>Bonus Question</strong>: Is it really faster or more effective than the standard if statement?</p>
  
  <pre><code>bool ret = false;
  if(count &gt; 0)
      ret = true;
  return ret;
  </code></pre>
  
  <p>Which one would you recommend?</p>