C# 当前程序所有线程

using System.Linq;

var threads = System.Diagnostics.Process.GetCurrentProcess().Threads;
var count = threads.Count;
var actived = threads.Cast<ProcessThread>().Where(t => t.ThreadState == System.Diagnostics.ThreadState.Running).ToList();
              

原文地址:https://www.cnblogs.com/smartsensor/p/3842320.html