SearchResult のパスを取得します。
Public ReadOnly Property Path As String
[C#]
public string Path {get;}
[C++]
public: __property String* get_Path();
[JScript]
public function get Path() : String;
プロパティ値
SearchResult のパス。
解説
Path プロパティは、Active Directory 階層でこのエントリを一意に識別します。このエントリは、常にこのパスを使用して取得できます。
使用例
[Visual Basic, C#, C++] 次の例は、 SearchResult の例の抜粋です。元のサンプルは、検索条件を持つ新しい DirectoryEntry を作成し、 FindOne メソッドを使用して検索を実行します。検索結果は GetDirectoryEntry に格納されます。検索結果は後でここから取り出され、解析されます。
[Visual Basic, C#, C++] この例では、検索結果から Path プロパティを解析する方法を示します。
Dim mySearchResultPath As String = mySearchResult.Path
Console.WriteLine("The path for the 'mySearchResult' search result is : {0}" + _
ControlChars.Newline, mySearchResultPath)
[C#]
string mySearchResultPath = mySearchResult.Path;
Console.WriteLine("The path for the 'mySearchResult' search "
+ "result is : {0}\n", mySearchResultPath);
[C++]
String* mySearchResultPath = mySearchResult->Path;
Console::WriteLine(S"The path for the 'mySearchResult' search result is : {0}\n", mySearchResultPath);
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
.NET Framework セキュリティ:
- 直前の呼び出し元の完全信頼。このメンバは、部分的に信頼されているコードから使用することはできません。詳細の参照先 : 部分信頼コードからのライブラリの使用
参照
SearchResult クラス | SearchResult メンバ | System.DirectoryServices 名前空間