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

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

SearchResult.Properties プロパティ

このオブジェクトのプロパティの ResultPropertyCollection コレクションを取得します。

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

Public ReadOnly Property
 Properties As ResultPropertyCollection
Dim instance As SearchResult
Dim value As ResultPropertyCollection

value = instance.Properties
public ResultPropertyCollection Properties { get;
 }
public:
property ResultPropertyCollection^ Properties {
    ResultPropertyCollection^ get ();
}
/** @property */
public ResultPropertyCollection get_Properties ()
public function get Properties
 () : ResultPropertyCollection

プロパティ値
オブジェクトに設定されたプロパティの ResultPropertyCollection。

解説解説

このコレクションは、DirectorySearcher.PropertiesToLoad を通じて明示的に要求されたプロパティだけを格納します。

使用例使用例

次の例は、SearchResult の例の抜粋です。元の例は、目的のパスを持つ新しい DirectoryEntry オブジェクトを作成し、FindOne メソッドを使用して検索を実行します。この例では、検索を実行した後、GetDirectoryEntry メソッドを使用して、検索結果に示されるライブ ディレクトリ エントリを取得します。

この例は、検索結果を ResultPropertyCollection に格納します。次に、各プロパティをコンソール ウィンドウに表示します。

' Get the properties for 'mySearchResult'.
Dim myResultPropColl As ResultPropertyCollection
myResultPropColl = mySearchResult.Properties
Console.WriteLine("The properties of the 'mySearchResult'
 are :")
Dim myKey As String
For Each myKey In  myResultPropColl.PropertyNames
   Dim tab1 As String =
 "    "
   Console.WriteLine(myKey + " = ")
   Dim myCollection As Object
   For Each myCollection In
  myResultPropColl(myKey)
      Console.WriteLine(tab1 + myCollection)
   Next myCollection
Next myKey

// Get the properties for 'mySearchResult'.
ResultPropertyCollection myResultPropColl;
myResultPropColl = mySearchResult.Properties;
Console.WriteLine("The properties of the " + 
                  "'mySearchResult' are :");
foreach( string myKey in myResultPropColl.PropertyNames)
{
   string tab = "    ";
   Console.WriteLine(myKey + " = ");
   foreach( Object myCollection in myResultPropColl[myKey])
   {
      Console.WriteLine(tab + myCollection);
   }
}

// Get the properties for 'mySearchResult'.
ResultPropertyCollection^ myResultPropColl = mySearchResult->Properties;
Console::WriteLine("The properties of the 'mySearchResult'
 are :");
IEnumerator^ myEnum = myResultPropColl->PropertyNames->GetEnumerator();
while (myEnum->MoveNext()) 
{
    String^ myKey = safe_cast<String^>(myEnum->Current);
    Console::WriteLine("{0} = ", myKey);
    IEnumerator^ myEnum = myResultPropColl->Item[myKey]->GetEnumerator();
    while (myEnum->MoveNext()) 
    {
        Console::WriteLine("\t{0}", myEnum->Current);
    }
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

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

   

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



SearchResult.Properties プロパティのページの著作権

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

©2026 GRAS Group, Inc.RSS