ManagementObject Constructor ()
.NET Framework 2.0
Initializes a new instance of the ManagementObject class. This is the default constructor.
Namespace: System.Management
Assembly: System.Management (in system.management.dll)
Assembly: System.Management (in system.management.dll)
The following example initializes a new instance of the ManagementObject class with the default constructor.
using System; using System.Management; class Sample { public static int Main(string[] args) { ManagementObject o = new ManagementObject(); // Now set the path on this object to // bind it to a 'real' manageable entity o.Path = new ManagementPath("Win32_LogicalDisk='c:'"); //Now it can be used Console.WriteLine(o["FreeSpace"]); return 0; } }
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.