title: Failed to set the specified COM apartment state ApartmentState.STA
body: <p>I am calling a COM method from a class A</p>
  
  <p>So to make thread Model of .Net same to Single Threaded Apartment </p>
  
  <p>I am calling following line of code in class A’s constructor </p>
  
  <pre><code>Thread.CurrentThread.SetApartmentState(ApartmentState.STA);
  </code></pre>
  
  <p>But I am getting</p>
  
  <p>Invalid operation exception “Failed to set the specified COM apartment state”</p>
  
  <p>What can I do to set current thread  to  Single Threaded Apartment</p>