RelatedObjectQuery.RelatedClass プロパティ

定義

エンドポイント オブジェクトのクラス (関連クラス) を取得または設定します。

public:
 property System::String ^ RelatedClass { System::String ^ get(); void set(System::String ^ value); };
public string RelatedClass { get; set; }
member this.RelatedClass : string with get, set
Public Property RelatedClass As String

プロパティ値

String

関連クラス名を格納している String 値を返します。

次の使用例は、WMI クラスを RelatedObjectQuery.

using System;
using System.Management;

class Sample
{
    public static void Main(string[] args)
    {
        RelatedObjectQuery q =
            new RelatedObjectQuery("Win32_ComputerSystem='MySystem'");
        q.RelatedClass = "Win32_Service";
    }
}
Imports System.Management


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

        Dim q As New RelatedObjectQuery( _
            "Win32_ComputerSystem=""MySystem""")
        q.RelatedClass = "Win32_Service"

    End Function
End Class

注釈

このプロパティ値を設定すると、オブジェクトに格納されている以前の値がオーバーライドされます。 クエリ文字列は、新しい関連クラスを反映するように再構築されます。

プロパティ値

関連するクラス名を含む文字列。

.NET Framework のセキュリティ

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

適用対象