为什么我在以下代码中找不到类型或命名空间名称“ManagementEventWatcher” :
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using System.Diagnostics;
using System.Management;
class Program {
public ManagementEventWatcher mgmtWtch;
static void Main(string[] args)
{
InitializeComponent();
mgmtWtch = new System.Management
.ManagementEventWatcher("Select * From Win32_ProcessStartTrace");
mgmtWtch.EventArrived += new
System.Management.EventArrivedEventHandler(mgmtWtch_EventArrived);
mgmtWtch.Start();
}
}
我认为我的dll没有这个方法,但是如何检查呢?