title: Invoking method on thread which created object
body: <p>Let's say I created an object O on the thread T. How can I get, from inside object O the thread T and invoke a method on that thread?. This way, it won't be necessary for the form that created the object to to this:</p>
  
  <pre><code>    private void ChangeProgress(int value)
      {
          progressBar1.Value = value;
      }
  
      void FD_ProgressChanged(object sender, DownloadEventArgs e)
      {
          if (InvokeRequired)
          {
              Invoke(new Action&lt;int&gt;(ChangeProgress), new object[] { e.PercentDone });
          }
          else ChangeProgress(e.PercentDone);
      }
  </code></pre>
  
  <p>which is just ugly and requires whoever uses the object to either figure out which events are raised on the same thread that created the object and which are not and add the <code>if(InvokeRequired)...else</code> code on the ones that are not, or just add the code on every single event handler. I think it would be more elegant if the object itself takes care of invoking the event on the right thread. Is this possible?</p>