这是我的代码,我从您的一个问题中复制而来,代码是:
class Program
{
static void Main(string[] args)
{
try
{
ManagementObjectSearcher searcher = new ManagementObjectSearcher("root\\WMI","SELECT * FROM MSWmi_PnPInstanceNames");
foreach (ManagementObject queryObj in searcher.Get())
{
Console.WriteLine("-----------------------------------");
//Console.WriteLine("MSWmi_PnPInstanceNames instance");
//Console.WriteLine("-----------------------------------");
Console.WriteLine("InstanceName: {0}", queryObj["InstanceName"]);
}
Console.Read();
}
catch (ManagementException e)
{
MessageBox.Show("An error occurred while querying for WMI data: " + e.Message);
}
}
}
现在,我的问题是:queryObj 数组的元素是什么?