C#创建线程

        private void GetData()
        {
            stop = true;

            Thread runtest = new Thread(new ParameterizedThreadStart(GettMethod));

            runtest.IsBackground = true;

            runtest.Start();
        }
        public void GettMethod(object data)
        {
            while (stop)
            {
       }
     }

 

posted @ 2020-04-01 16:30  LcVong  Views(54)  Comments(0Edit  收藏  举报