ManagementObject.ClassPath Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the path to the object's class.
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
Property Value
A ManagementPath representing the path to the object's class.
Examples
The following example initializes a new instance of the ManagementObject class and then retrieves the class path for the 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
Remarks
This property is read-only.
.NET Framework Security
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.
Applies to
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET