【学步者日记】C#使用线程

http://note.youdao.com/noteshare?id=2810300cdfa3f4d973792dcf30a31db9

System.Threading.Thread th;
th = new System.Threading.Thread(
    delegate()//匿名函数
    {
        while(true)
        {
            //这个thi是外部主线程的this,依然使用匿名函数,且转换为MethodInvoker以调用Invoke
            this.Invoke((MethodInvoker)delegate{ 若干代码 } );
            System.Threading.Thread.Sleep(1000);//睡眠1000毫秒
        }
    }
);
th.IsBackground = true;//后台线程
th.Start();//使用th.Abort()结束线程
原文地址:https://www.cnblogs.com/JackSamuel/p/9672929.html