共用方式為


SearchResult.Path 屬性

定義

找到這 SearchResult條路徑。

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

屬性值

SearchResult條路。

範例

以下範例為 中 SearchResult該範例的摘錄。 原始範例會建立 DirectoryEntry 一個新的物件,並使用 FindOne 該方法啟動搜尋。 執行搜尋後,範例會使用此 GetDirectoryEntry 方法擷取搜尋結果中識別的即時目錄條目。

這個範例展示了如何從搜尋結果中解析該 Path 屬性。

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);

備註

Path 屬性能在 Active Directory 網域服務階層中唯一識別此項。 該條目總是可透過此路徑被檢索。

適用於