判断线程是否是主线程 System.Threading.Thread.CurrentThread.ApartmentState STA 为主线程 MTA 转载于:https://www.cnblogs.com/xinyf/p/10305379.html