title: if return statement in c#
body: <p>I am overriding a virtual method and I need to return a value depending on a bool expression.</p>
  
  <pre><code>  public override float Q()
      {
          return (float)Math.Sqrt(2 * A* B / C);
      }
  </code></pre>
  
  <p>I need to return a local member (call it D) for Q() if the calculated value shown above is less than D. I tried using regular if statements, but it won't return a value unless it's returned outside the if statement. Any help would be appreciated.</p>