学习网站可以在http://www.yesky.com/331/215831.shtml
里看到所有文章

a.在C#中要使用线程要引用System.Threading;

C#多线程学习笔记(一)using System.Threading;

b.在C#可以对程进行命名

C#多线程学习笔记(一)Thread _thrd = new Thread(new ThreadStart(C#多线程学习笔记(一)));
C#多线程学习笔记(一)_thrd.Name 
= "thisthrd.name"

c.可以通过Thread的static属性获取当前线程
C#多线程学习笔记(一)Thread.CurrentThread

d.操作线程的几个重要的方法

Start():启动线程
Sleep(int):静态方法,暂停当前线程指定的毫秒数
Abort():通常使用该方法来终止一个线程
Suspend():该方法并不终止未完成的线程,它仅仅挂起线程,以后还可恢复。
Resume():恢复被Suspend()方法挂起的线程的执行

e. sample

C#多线程学习笔记(一)using System;
C#多线程学习笔记(一)
using System.Collections.Generic;
C#多线程学习笔记(一)
using System.Text;
C#多线程学习笔记(一)
using System.Threading;
C#多线程学习笔记(一)
C#多线程学习笔记(一)
namespace ThreadOperation

相关文章:

  • 2022-01-22
  • 2021-06-28
  • 2021-11-16
  • 2022-12-23
  • 2022-12-23
  • 2021-05-28
猜你喜欢
  • 2021-06-01
  • 2021-11-14
  • 2022-12-23
  • 2021-11-28
  • 2021-09-16
  • 2022-01-26
相关资源
相似解决方案