ManagementObject.ClassPath Propriedade

Definição

Obtém ou define o caminho para a classe do objeto.

public:
 virtual property System::Management::ManagementPath ^ ClassPath { System::Management::ManagementPath ^ get(); };
public override System.Management.ManagementPath ClassPath { get; }
member this.ClassPath : System.Management.ManagementPath
Public Overrides ReadOnly Property ClassPath As ManagementPath

Valor de Propriedade

A ManagementPath representa o caminho para a classe do objeto.

Exemplos

O exemplo seguinte inicializa uma nova instância da ManagementObject classe e depois recupera o caminho da classe para o ManagementObject.

using System;
using System.Management;
public class Sample
{
    public static void Main()
    {
        ManagementObject o = new ManagementObject();

        // Specify the WMI path to which
        // this object should be bound to
        o.Path = new ManagementPath(
            "Win32_Process.Name='calc.exe'");
    }
}
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( _
            "Win32_Process.Name=""calc.exe""")

        Return 0
    End Function
End Class

Observações

Esta propriedade é somente leitura.

Segurança do .NET Framework

Confiança total no contacto imediato. Este membro não pode ser utilizado por código parcialmente confiável. Para mais informações, consulte Utilização de Bibliotecas de Código Parcialmente Confiável.

Aplica-se a