title: How does C# evaluate Logic block?
body: <p>I have the following line of code:</p>
  
  <pre><code>    public bool dcpl_radar()
      {
          if (radar == null)
              return false;
          else
          {
              if (radar != null)
              {
                  if (radar.InvokeRequired)
                      radar.BeginInvoke(new MethodInvoker(delegate() 
                                                  { 
                                                      radar.Visible = false; 
                                                  }));
                  else
                      this.radar.Visible = false;
  
                  radar = null;
              }
              return true;
          }//end of else statement
      }
  </code></pre>
  
  <p>but VStudio keeps throwing an error on the invoke line. I've checked the Debugger and <strong>if (radar == null)</strong> is true, yet VStudio is trying to evaluate a part of the code it shouldn't be in. Can someone explain why it's doing this please?</p>