title: Parameter count mismatch when invoking control with multiple parameters
body: <p>I use a thread to execute some process on a machine. Eventually, the progress is reported back in an other thread. To update the GUI with the status of the process, I use a delegate like this:</p>
  
  <pre><code>public delegate void UpdateProgressDelegate(string description, int scriptnumber);
  public void UpdateProgress(string description, int scriptnumber) {
      if (treeView.InvokeRequired) {
          treeView.Invoke(new UpdateProgressDelegate(UpdateProgress), description, scriptnumber);
          return;
      }
      // Update the treeview
  }
  </code></pre>
  
  <p>And to call this delegate I use:</p>
  
  <pre><code>form.UpdateProgress("Ready", 3);
  </code></pre>
  
  <p>When the Invoke is called, I get a TargetParameterCountException: Parameter count mismatch.
  I thought I could fix this by placing the string and int parameters in a single object like this:</p>
  
  <pre><code>public delegate void UpdateProgressDelegate(object[] updateinfo);
  public void UpdateProgress(object[] updateinfo) {
      string description = (string) updateinfo[0];
      int scriptnumber = (int) updateinfo[1];
      if (treeView.InvokeRequired) {
          treeView.Invoke(new UpdateProgressDelegate(UpdateProgress), new object[] { description, scriptnumber });
          return;
      }       
      // Update the treeview
  }
  </code></pre>
  
  <p>And to call it I use:</p>
  
  <pre><code>form.UpdateProgress(new object[] {"Ready", 3});
  </code></pre>
  
  <p>But this doesn't work either. I keep getting the same TargetParameterCountException. Any ideas how I could fix this? Thanks in advance!</p>