当前位置:编程学习 > C#/ASP.NET >>

一款C#多线程测试实例

一款c#多线程测试实例
简单实例

namespace xxx
{
    public class tclass
    {
         static tclass()
         {
             thread r = new thread(new threadstart(inusrgame));
             r.start();
         }
    }
}


详细多线程

using system;
using system.threading;
public class tclass
{
    public tclass()
    {
        thread r = new thread(new threadstart(inusrgame));
        r.start();
    }
    static void inusrgame()
    {
        console.writeline("ok");
    }
}
class a
{
    static void main()
    {
      tclass t=new tclass();
      console.readline();
    }
}

 

补充:asp.net教程,C语言
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,