ManagementBaseObject.SystemProperties プロパティ

定義

管理オブジェクトの WMI (Windows Management Instrumentation) システム プロパティのコレクションを取得します (たとえば、クラス名、サーバー、および名前空間)。 WMI システム プロパティ名は、"__" で始まります。

public:
 virtual property System::Management::PropertyDataCollection ^ SystemProperties { System::Management::PropertyDataCollection ^ get(); };
public virtual System.Management.PropertyDataCollection SystemProperties { get; }
member this.SystemProperties : System.Management.PropertyDataCollection
Public Overridable ReadOnly Property SystemProperties As PropertyDataCollection

プロパティ値

PropertyDataCollection

管理オブジェクトのシステム プロパティを格納するコレクション。

次の例では、プロパティを SystemProperties 使用して、 Win32_Process クラスのシステム プロパティの名前と値を表示します。 Win32_Process クラスの詳細については、Windows Management Instrumentation のドキュメントを参照してください。

using System;
using System.Management;

public class Sample
{
    public static void Main()
    {

        // Get the WMI class
        ManagementClass processClass =
            new ManagementClass("Win32_Process");

        // Get the system properties for the class
        PropertyDataCollection properties =
            processClass.SystemProperties;

        // display the properties
        foreach (PropertyData p in properties)
        {
            Console.WriteLine(p.Name);
            Console.WriteLine(p.Value);
            Console.WriteLine();
        }
    }
}
Imports System.Management


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

        ' Get the WMI class
        Dim processClass As New ManagementClass( _
            "Win32_Process")

        ' Get the system properties for the class
        Dim properties As PropertyDataCollection
        properties = processClass.SystemProperties

        For Each p As PropertyData In properties

            Console.WriteLine(p.Name)
            Console.WriteLine(p.Value)
            Console.WriteLine()

        Next
    End Function
End Class

注釈

プロパティ値

管理オブジェクトのシステム プロパティを表す A PropertyDataCollection

.NET Framework のセキュリティ

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

適用対象