SearchResult.Properties 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
이 개체의 ResultPropertyCollection 속성 컬렉션을 가져옵니다.
public:
property System::DirectoryServices::ResultPropertyCollection ^ Properties { System::DirectoryServices::ResultPropertyCollection ^ get(); };
public System.DirectoryServices.ResultPropertyCollection Properties { get; }
member this.Properties : System.DirectoryServices.ResultPropertyCollection
Public ReadOnly Property Properties As ResultPropertyCollection
속성 값
이 개체에 설정된 속성의 A ResultPropertyCollection 입니다.
예제
다음 예제는 .에 있는 예제의 발췌입니다 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);
}
}
설명
이 컬렉션에는 .를 통해 DirectorySearcher.PropertiesToLoad명시적으로 요청된 속성만 포함됩니다.