无参数线程
Thread t = new Thread(new ThreadStart(function));
t.Start();
单参数线程(参数以object类型传入)
Thread t = new Thread(new ParameterizedThreadStart(FunctionName));
t.Start(parameter);
private static void B(object obj) {
//......
}
无参数线程
Thread t = new Thread(new ThreadStart(function));
t.Start();
单参数线程(参数以object类型传入)
Thread t = new Thread(new ParameterizedThreadStart(FunctionName));
t.Start(parameter);
private static void B(object obj) {
//......
}
本文标题:创建线程的各种方法记录
本文链接:https://www.haomeiwen.com/subject/bgrdtxtx.html
网友评论