//無參數的應用
Thread m_SplashThread = new Thread(new ThreadStart(delegate()
{
//調用執行的方法
}));
m_SplashThread.IsBackground = true;
m_SplashThread.SetApartmentState(ApartmentState.STA);
m_SplashThread.Start();
//有參數
Thread m_SplashThread = new Thread(new ParameterizedThreadStart(delegate(object OBJ)
{
string THreadID = (string)OBJ.GetType().GetProperties()[0].GetValue(OBJ, null);//轉化為CunLogin相應的的類型
LxMailPopHelper THreadClient = (LxMailPopHelper)OBJ.GetType().GetProperties()[1].GetValue(OBJ, null);//轉化為PopClient相應的的類型
}));
m_SplashThread.IsBackground = true;
m_SplashThread.SetApartmentState(ApartmentState.STA);
m_SplashThread.Start(new { CunLogin, PopClient }); //不要用new object[]這樣是個數組
“`