线程

判断线程是否是主线程

System.Threading.Thread.CurrentThread.ApartmentState 

STA 为主线程

MTA 

原文地址:https://www.cnblogs.com/xinyf/p/10305379.html