在C#中,如何知道和获得CPU,内存的使用率
如题,谢谢了 --------------------编程问答-------------------- using System.Diagnostics;using System.ServiceProcess;
private float CpuInfo()
{
PerformanceCounter pc = new PerformanceCounter("Process", "% Processor Time", "Idle");
float first = pc.NextValue();
Thread.Sleep(1);
float Second = pc.NextValue();
return Second;
} --------------------编程问答-------------------- 同楼上,这里有个源码:http://www.cnpopsoft.com/article.asp?id=54
补充:.NET技术 , C#