标签:static har obj public ace thread index ber eric
1.定义线程启动的函数,如
private
static
void
fun(
object
obj)
{
Console.WriteLine(
"Hello, {0}!"
,obj.ToString ());
}
using
System;
using
System.Collections.Generic;
using
System.Text;
using
System.Threading;
public
static
void
Main()
{
Thread t =
new
Thread(
new
ParameterizedThreadStart(fun));
t.Start(
"lilei"
);
Console.ReadLine();
}
标签:static har obj public ace thread index ber eric
原文地址:http://www.cnblogs.com/Cpart/p/6992338.html