ManagementPath.ClassName プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ManagementPath.ClassName プロパティの意味・解説 

ManagementPath.ClassName プロパティ

パスクラス部分取得または設定します

名前空間: System.Management
アセンブリ: System.Management (system.management.dll 内)
構文構文

Dim instance As ManagementPath
Dim value As String

value = instance.ClassName

instance.ClassName = value
public string ClassName { get;
 set; }
/** @property */
public String get_ClassName ()

/** @property */
public void set_ClassName (String value)

プロパティ
パスクラス部分保持している String 値を返します

解説解説
使用例使用例

ManagementPath クラスWMI オブジェクトへのパス解析する方法の例を次に示します。この例で解析されパスは、クラスインスタンスへのパスです。

Imports System
Imports System.Management


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

        ' Get the WMI class path
        Dim p As ManagementPath = _
            New ManagementPath( _
            "\\ComputerName\root" & _
            "\cimv2:Win32_LogicalDisk.DeviceID=""C:""")

        Console.WriteLine("IsClass: " & _
            p.IsClass)
        ' Should be False (because it is an instance)

        Console.WriteLine("IsInstance: " & _
            p.IsInstance)
        ' Should be True

        Console.WriteLine("ClassName: " & _
            p.ClassName)
        ' Should be "Win32_LogicalDisk"

        Console.WriteLine("NamespacePath: " &
 _
            p.NamespacePath)
        ' Should be "ComputerName\cimv2"

        Console.WriteLine("Server: " & _
            p.Server)
        ' Should be "ComputerName"

        Console.WriteLine("Path: " & _
            p.Path)
        ' Should be "ComputerName\root\cimv2:
        ' Win32_LogicalDisk.DeviceId="C:""

        Console.WriteLine("RelativePath: " & _
            p.RelativePath)
        ' Should be "Win32_LogicalDisk.DeviceID="C:""

    End Function
End Class
using System;
using System.Management;

public class Sample 
{    
    public static void Main()
 
    {

        // Get the WMI class path
        ManagementPath p = 
            new ManagementPath(
            "\\\\ComputerName\\root" +
            "\\cimv2:Win32_LogicalDisk.DeviceID=\"C:\"");

        Console.WriteLine("IsClass: " +
            p.IsClass);
        // Should be False (because it is an instance)

        Console.WriteLine("IsInstance: " +
            p.IsInstance);
        // Should be True

        Console.WriteLine("ClassName: " +
            p.ClassName);
        // Should be "Win32_LogicalDisk"

        Console.WriteLine("NamespacePath: " +
            p.NamespacePath);
        // Should be "ComputerName\cimv2"

        Console.WriteLine("Server: " + 
            p.Server);
        // Should be "ComputerName"

        Console.WriteLine("Path: " +
            p.Path);
        // Should be "ComputerName\root\cimv2:
        // Win32_LogicalDisk.DeviceId="C:""

        Console.WriteLine("RelativePath: " +
            p.RelativePath);
        // Should be "Win32_LogicalDisk.DeviceID="C:""

    }
}
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からManagementPath.ClassName プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からManagementPath.ClassName プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からManagementPath.ClassName プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

ManagementPath.ClassName プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



ManagementPath.ClassName プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS