我想列出所有正在运行的线程,但不要使用List<>该类。我想动态观察正在运行的线程。我怎样才能做到这一点?
List<>
using System.Diagnostics; ProcessThreadCollection currentThreads = Process.GetCurrentProcess().Threads; foreach (ProcessThread thread in currentThreads) { // Do whatever you need }