110,537
社区成员
发帖
与我相关
我的任务
分享
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
System.Threading.Thread NewTh;
for (int i = 0; i < 5; i++)
{
NewTh = new System.Threading.Thread(Test);
NewTh.Start(i);
NewTh = new System.Threading.Thread(delegate() { Test("Sandy", i.ToString()); });
NewTh.Start();
}
}
}
private void Test(object value)
{
System.Threading.Thread.Sleep(5000);
}
private void Test(string name, string pwd)
{
System.Threading.Thread.Sleep(3000);
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
System.Threading.Thread NewTh;
for (int i = 0; i < 5; i++)
{
NewTh = new System.Threading.Thread(Test);
NewTh.Start(i);
}
}
}
private void Test(object value)
{
System.Threading.Thread.Sleep(5000);
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
System.Threading.Thread NewTh;
for (int i = 0; i < 5; i++)
{
NewTh = new System.Threading.Thread(new System.Threading.ThreadStart(Test));
NewTh.Start();
}
}
}
private void Test()
{
System.Threading.Thread.Sleep(5000);
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
System.Threading.Thread NewTh;
for (int i = 0; i < 5; i++)
{
NewTh = new System.Threading.Thread(new System.Threading.ThreadStart(Test));
NewTh.Start();
}
}
}
private void Test()
{
Response.Write(DateTime.Now.ToString() + "<br >");
}