Export (0) Print
Expand All

ManagementObject.ClassPath Property

Gets or sets the path to the object's class.

[Visual Basic]
Overrides Public ReadOnly Property ClassPath As ManagementPath
[C#]
public override ManagementPath ClassPath {get;}
[C++]
public: __property ManagementPath* get_ClassPath();
[JScript]
public override function get ClassPath() : ManagementPath;

Property Value

A ManagementPath representing the path to the object's class.

Remarks

This property is read-only.

Example

[C#] 
ManagementObject o = new ManagementObject("MyClass.Name='abc'"); 

//Get the class definition for the object above.
ManagementClass c = new ManagementClass(o.ClassPath);
   
[Visual Basic] 
Dim o As New ManagementObject("MyClass.Name=""abc""")

'Get the class definition for the object above.
Dim c As New ManagementClass(o.ClassPath);
   

[C++, JScript] No example is available for C++ or JScript. To view a Visual Basic or C# example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

ManagementObject Class | ManagementObject Members | System.Management Namespace

Show:
© 2014 Microsoft