ManagementObject.ClassPath プロパティ

定義

オブジェクトのクラスへのパスを取得または設定します。

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

プロパティ値

オブジェクトのクラスへのパスを表す ManagementPath

次の例では、 クラスの新しいインスタンスを ManagementObject 初期化し、 のクラス パスを 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

注釈

このプロパティは読み取り専用です。

.NET Framework のセキュリティ

直前の呼び出し元に対する完全な信頼。 このメンバーは、部分的に信頼されているコードから使用することはできません。 詳細については、「 部分信頼コードからのライブラリの使用」を参照してください。

適用対象