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);
}
线程启动带多个参数的方法
最新推荐文章于 2022-01-27 11:52:47 发布