You can find some explanations in this extract of a book : ApartmentState
C# Thread and what does it mean to set ApartmentState.STA or ApartmentState.MTA
T.Zacks
3,996
Reputation points
I do not know what happen when we set STA & MTA for thread. please tell me if i set mythread.SetApartmentState(ApartmentState.STA); then what will happen ?
and same way if i set mythread.SetApartmentState(ApartmentState.MTA); then what will happen ?
1) what is difference between ApartmentState.STA & ApartmentState.MTA ?
2) thread state default is MTA but if i set STA then what will change in execution flow of thread?
looking for a good guide line. thanks
Thanks
Developer technologies | C#
11,579 questions