c#多线程
来源:互联网 发布:阿里云客服怎么计薪资? 编辑:程序博客网 时间:2024/04/30 20:58
c#多线程
using System.Threading;
public Thread tr1;
上面是定义
tr1=new Thread(new ThreadStart(函数));//函数不要括号
tr1.Start();
上面是启动
tr1.Abort();
Thread.Sleep(200);
退出与延时
//-线程带参数----------------------------------------------
using System;
using System.Threading;
namespace ParameterizedThreadStartTest
{
class Program
{
static void Main(string[] args)
{
ParameterizedThreadStart myParameterizedThreadDelegate = new ParameterizedThreadStart(ThreadMethod);
Thread myThread = new Thread(myParameterizedThreadDelegate);
object o = "hello";
myThread.Start(o);
}
private static void ThreadMethod(object o)
{
string str = o as string;
Console.WriteLine(str);
}
}
}
- c#多线程
- C#多线程
- C#多线程
- C#多线程
- C#多线程
- 多线程c#
- c#多线程
- c# 多线程
- C# 多线程
- C#多线程
- c# 多线程
- C#多线程
- C#多线程
- c#多线程
- C#多线程
- C#多线程
- C# 多线程
- c# 多线程
- asp.net 接收post过来的东西
- .net md5加密
- css背景透明可用于img,td table
- html书签
- 当你希望从ashx或HttpHandler里访问你的Session时,你必须实现IReadOnlySessionState接口.
- c#多线程
- 不得志的“艺术家”
- js刷新页面,aspx刷新页面
- C#中的RichTextBox怎样将光标自动跳转到指定的位置呢?
- 允许不同线程调用同一个控件
- c#域名转ip
- webservice远程调试
- 从程序员角度看ELF
- png图片作为td背景的时候让png 的背景透明