SearchResult.Path Vlastnost

Definice

Získá cestu pro tento SearchResult.

public:
 property System::String ^ Path { System::String ^ get(); };
public string Path { get; }
member this.Path : string
Public ReadOnly Property Path As String

Hodnota vlastnosti

Cesta k tomuto SearchResult.

Příklady

Následující příklad je výňatek z příkladu v SearchResultnástroji . Původní příklad vytvoří nový DirectoryEntry objekt s požadovanou cestou a použije metodu FindOne k zahájení hledání. Po provedení hledání použije příklad metodu GetDirectoryEntry k načtení živé položky adresáře, která je identifikována ve výsledcích hledání.

Tento příklad ukazuje, jak analyzovat Path vlastnost z výsledku hledání.

Dim mySearchResultPath As String = mySearchResult.Path  
Console.WriteLine("The path for the 'mySearchResult' search result is : {0}" + _  
                  ControlChars.Newline, mySearchResultPath)  
string mySearchResultPath = mySearchResult.Path;  
Console.WriteLine("The path for the 'mySearchResult' search "  
                  + "result is : {0}\n", mySearchResultPath);  
String^ mySearchResultPath = mySearchResult->Path;  
Console::WriteLine("The path for the 'mySearchResult' search result is : {0}\n", mySearchResultPath);  

Poznámky

Vlastnost Path jednoznačně identifikuje tuto položku v hierarchii Active Directory Domain Services. Položku lze vždy načíst pomocí této cesty.

Platí pro