ManagementBaseObject.ClassPath プロパティ
アセンブリ: System.Management (system.management.dll 内)

管理オブジェクトのクラスへのクラス パスを示す ManagementPath を返します。


root\CIMV2 名前空間内にクラス パスを持つすべてのクラスを表示するコード例を次に示します。
\\MyBox\root\cimv2:Win32_LogicalDisk= 'C:' オブジェクトでは、クラス パスは \\MyBox\root\cimv2:Win32_LogicalDisk です。
Imports System Imports System.Management Class Sample Public Overloads Shared Function _ Main(ByVal args() As String) As Integer ' Create a query for classes Dim query As New SelectQuery( _ "SELECT * FROM meta_class") ' Initialize an object searcher with this query Dim searcher As New ManagementObjectSearcher( _ query) ' Get the resulting collection and loop through it For Each classObject As ManagementObject _ In searcher.Get() Console.WriteLine( _ classObject.ClassPath) Next End Function End Class
using System; using System.Management; public class Sample { public static void Main() { // Create a query for classes SelectQuery query = new SelectQuery("SELECT * FROM meta_class"); // Initialize an object searcher with this query ManagementObjectSearcher searcher = new ManagementObjectSearcher(query); // Get the resulting collection and loop through it foreach (ManagementObject classObject in searcher.Get()) { Console.WriteLine( classObject.ClassPath); } } }


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からManagementBaseObject.ClassPath プロパティを検索する場合は、下記のリンクをクリックしてください。

- ManagementBaseObject.ClassPath プロパティのページへのリンク