title: Conditional operators not behaving as expected
body: <p>I am learning about conditional operators. The <a href="https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/conditional-operator" rel="nofollow noreferrer">documentation</a> mentions</p>
  <pre><code>condition ? consequent : alternative
  </code></pre>
  <p>From my example, Test1() is the current method that works, but I wanted to write the equivalent using conditional operators shown in Test2().</p>
  <pre><code>  public void Test1(bool isTrue)
    {
       if (isTrue)
       {
          MethodA();
       }
       else
       {
          MethodB();
       }
    }
  
    public void Test2(bool isTrue)
    {
       isTrue ? MethodA() : MethodB();
    }
  
  
    public void MethodA()
    {
       //Do This
    }
  
    public void MethodB()
    {
       //Do That
    }
  </code></pre>
  <p>I am receiving an error for Test2()</p>
  <blockquote>
  <p>&quot;isTrue&quot; is a variable but used like a type</p>
  </blockquote>
  <p>and</p>
  <blockquote>
  <p>Local Function 'MethodA()' must declare a body because it is not marked 'static extern'</p>
  </blockquote>
  <p>Can someone explain why this is the case?</p>