SearchResult::Path Property

 

Gets the path for this SearchResult.

Namespace:   System.DirectoryServices
Assembly:  System.DirectoryServices (in System.DirectoryServices.dll)

public:
property String^ Path {
	String^ get();
}

Property Value

Type: System::String^

The path of this SearchResult.

The Path property uniquely identifies this entry in the Active Directory Domain Services hierarchy. The entry can always be retrieved using this path.

The following example is an excerpt of the example in SearchResult. The original example creates a new DirectoryEntry object with the desired path and uses the FindOne method to initiate the search. After performing the search, the example uses the GetDirectoryEntry method to retrieve the live directory entry that is identified in the search results.

This example shows how to parse the Path property from the search result.

String^ mySearchResultPath = mySearchResult->Path;
Console::WriteLine("The path for the 'mySearchResult' search result is : {0}\n", mySearchResultPath);

.NET Framework
Available since 1.1
Return to top
Show: