C# 线程名称ShowThreadName(线程操作类Thread)

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;

class ShowThreadName
{
    static void Main(string[] args)
    {    //Thread类,线程操作类, 类似数组操作类 Array
        //Thread  saled封类,不能被继承  
        Thread.CurrentThread.Name = "主线程";
        Console.WriteLine("Thread:" + Thread.CurrentThread.Name);
        Console.ReadLine();
    }
}

 

已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: 代码科技 设计师:Amelia_0503 返回首页