Hello,
Im using WMI to get CPU information through Win32_Processor.
It returns a collection but some items are "not valid".
.....
foreach( ManagementObject oReturn in oReturnCollection )
{
Console.WriteLine(oReturn["Manufacturer"].ToString());
Console.WriteLine(oReturn["ProcessorId"].ToString());
}
If oReturn["ProcessorId"] does not "exist" it crash with error:
Additional information: Object reference not set to an instance of an object.
How can I test to see if oReturn["ProcessorId"] is set to an instance
befor I WriteLine(...) it?
Thanks,
Joao Rego