title: Multithreading - how to invoke Action
body: <p>I have some menu popup with action buttons. This is popup so it is made in new thread. I add event to created buttons something like this:</p>
  
  <pre><code>private StdProcedure m_ToInvoke;
  
  public void AddButton()
  {
      Button myChildTempButton = new Button();
      myChildTempButton.ItemClick += new ItemClickEventHandler((x, y) =&gt; 
      { 
         HidePopup(); m_ToInvoke = myOpp.Procedure; 
      });
   }
  </code></pre>
  
  <p>StdProcedure is delegate</p>
  
  <pre><code> public delegate void StdProcedure();
  </code></pre>
  
  <p>And after close event:</p>
  
  <pre><code> protected override void OnPopupClosed()
   {
      base.OnPopupClosed();
      if (m_ToInvoke != null) m_ToInvoke.Invoke();
   }
  </code></pre>
  
  <p>That doesn't work correctly. Sometime invoked operations stopped my another thread and I don't understand how it's works. </p>
  
  <p>My question is what is the different between:</p>
  
  <pre><code>m_ToInvoke()
  m_ToInvoke.Invoke()
  m_ToInvoke.BeginInvoke()
  m_ToInvoke.DynamicInvoke()
  </code></pre>
  
  <p>and what should I use here?</p>
  
  <p>For me first and second is the same in effect.</p>