c# 获取 系统性能计数器的 值
为什么 我获取的值都是 零的 希望高手解决 呵呵using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
namespace WindowsApplication2
{
public partial class Form1 : Form
{
// 实例一个计数器
private static PerformanceCounter mIdle = new PerformanceCounter("Process", "% Processor Time", "Idle");
public Form1()
{
InitializeComponent();
double dd = mIdle.NextValue();
MessageBox.Show(dd.ToString());
}
}
} --------------------编程问答-------------------- ding!!!!
补充:.NET技术 , C#