线程启动带多个参数的方法

来源:互联网 发布:武汉矩阵互动面试 编辑:程序博客网 时间:2024/05/02 02:35
static void Main(string[] args){    Thread thread = new Thread(()=> { Test(1, "A", "B"); });    thread.IsBackground = true;    thread.Start();    Console.ReadLine();}private static void Test(int num, string str, object obj){    Console.WriteLine("第一个参数:{0}\r\n第二个参数:{1}\r\n第三个参数:{2}", num, str, obj);}


                                             
0 0
原创粉丝点击