static void Main(string[] args)
{
Thread thread = new Thread(() =>
{
OneTest("a", "b", 666, new Program());
});
thread.Name = "Test";
thread.Start();
Console.ReadKey();
}
public static void OneTest(string a, string b, int c, Program p)
{
Console.WriteLine("新的线程已经启动");
}
.net core 启动线程带参数
最新推荐文章于 2024-02-26 00:46:57 发布