using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
//引用线程命名空间
using System.Threading;
namespace Test
{
class Program
{
static void Main(string[] args)
{
Thread t = new Thread(new ThreadStart(ThreadProc));
Console.WriteLine("定义");
t.Start();
Console.WriteLine("启动");
Thread.Sleep(0);
Console.WriteLine("休眠");
t.Join();
Console.WriteLine("结束");
Console.ReadLine();
}
public static void ThreadProc()
{
string threa = "在这里获取UDP传递的流,其类型为byte[]";
Console.WriteLine(threa);
Thread.Sleep(0);
}
}
}
thread概念
最新推荐文章于 2022-05-22 23:45:34 发布