Only System.Management namespace listed is Instrumentation... what isgoing on?

  • Thread starter Matt Brown - identify
  • Start date
M

Matt Brown - identify

I'm new to (visual) c# and began tonight. My background is in
VB .NET, so the adjust is mostly syntax.

Anyway...

I'm trying to perform a WMI query using classes in the
System.Management namespace, unfortunately the necessary namespaces
aren't listed. The only namespace listed is Instrumentation.

I have a feeling it's something stupid and simple.

Any help is appreciated.


Thanks,

Matt
 
M

Matt Brown - identify

I'm new to (visual) c# and began tonight. My background is in
VB .NET, so the adjust is mostly syntax.

Anyway...

I'm trying to perform a WMI query using classes in the
System.Management namespace, unfortunately the necessary namespaces
aren't listed. The only namespace listed is Instrumentation.

I have a feeling it's something stupid and simple.

Any help is appreciated.

Thanks,

Matt

Got it:


http://www.geekpedia.com/tutorial233_Getting-Disk-Drive-Information-using-WMI-and-Csharp.html

While you still have your hand on the mouse, we'll need a reference to
System.Management before we can query WMI. That can easily be done by
right clicking "Reference" in the Solution Explorer and selecting "Add
Reference."

Add System.Management Reference

In the .NET tab scroll down to System.Management and click OK to add
this reference.

Add System.Management Reference

Switch to code view and add the following using statement:


using System.Management;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top