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();
C# 当前程序所有线程
时间: 2024-11-09 03:40:21