ManagementObject.ClassPath Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

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

Namespace:   System.Management
Assembly:  System.Management (in System.Management.dll)

Public Overrides ReadOnly Property ClassPath As ManagementPath

Property Value

Type: System.Management.ManagementPath

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

This property is read-only.

Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.

The following example initializes a new instance of the ManagementObject class and then retrieves the class path for the ManagementObject.

Imports System
Imports System.Management
Public Class Sample

    Public Overloads Shared Function Main( _
    ByVal args() As String) As Integer

        Dim o As New ManagementObject

        ' Specify the WMI path to which 
        ' this object should be bound to
        o.Path = New ManagementPath( _

        Return 0
    End Function
End Class

.NET Framework
Available since 1.1
Return to top