The Old New Thing

If you want to set a thread's apartment model via Thread.CurrentThread.ApartmentState, you need to act quickly

Welcome to CLR Week 2014. Don't worry, it'll be over in a few days. A customer wanted to know why their was displaying the infamous Current thread must be set to single thread apartment (STA) mode before OLE calls can be made error. "Even though we set the to , the apartment state is still . Curiously, if we put the above code in a ...