c#开启多线程带参数

来源:互联网 发布:忘记网络账号密码 编辑:程序博客网 时间:2024/05/22 17:03
  static void Main(string[] args)
        {
            Thread[] threads = new Thread[100];
            for (int i = 0; i < threads.Count(); i++)
            {
                threads[i] = new Thread(new ParameterizedThreadStart(CreateInvistCode));
                threads[i].Start((170+i).ToString());
            }
            Console.ReadKey();


        }


        private static void CreateInvistCode(object obj)
        {
            

        }



0 0
原创粉丝点击