title: SetApartmentState and [STAThread]
body: <p>In Watin's <a href="http://sourceforge.net/projects/watin/" rel="nofollow noreferrer">source code</a>, there is this piece of code:</p>
  
  <pre><code>    public void NavigateToNoWait(Uri url)
      {
          var thread = new Thread(GoToNoWaitInternal);
          thread.SetApartmentState(ApartmentState.STA);
          thread.Start(url);
          thread.Join(500);
      }
  
      [STAThread]
      private void GoToNoWaitInternal(object uriIn)
      {
          var uri = (Uri)uriIn;
          NavigateTo(uri);
      }
  </code></pre>
  
  <p>Since the thread created has its apartment state set, why is the <code>[STAThread]</code> attribute added to the method? I am not interested in the specific piece of code, but I am wondering if <code>STAThread</code> attribute is needed at all.</p>
  
  <p>Notes:</p>
  
  <ul>
  <li>The method <code>GoToNoWaitInternal</code> isn't used elsewhere.</li>
  <li>The whole watin project is about manipulating WebBrowser objects (Internet explorer windows in general). Thus, we are manipulating a COM Object.</li>
  </ul>