语言

DirectorySearcher.PropertiesToLoad 属性

定义

获取一个值,该值指示要在搜索期间检索的属性列表。

public:
 property System::Collections::Specialized::StringCollection ^ PropertiesToLoad { System::Collections::Specialized::StringCollection ^ get(); };
public System.Collections.Specialized.StringCollection PropertiesToLoad { get; }
[System.DirectoryServices.DSDescription("DSPropertiesToLoad")]
public System.Collections.Specialized.StringCollection PropertiesToLoad { get; }
member this.PropertiesToLoad : System.Collections.Specialized.StringCollection
[<System.DirectoryServices.DSDescription("DSPropertiesToLoad")>]
member this.PropertiesToLoad : System.Collections.Specialized.StringCollection
Public ReadOnly Property PropertiesToLoad As StringCollection

属性值

一个 StringCollection 对象,其中包含在搜索过程中要检索的属性集。

默认值为空 StringCollection,用于检索所有属性。

特性

注解

若要检索特定属性,请在开始搜索之前将其添加到此集合。 例如, searcher.PropertiesToLoad.Add("phone"); 将电话属性添加到要搜索中检索的属性列表中。

始终在搜索期间检索属性“ADsPath”。 在 Windows 2000 和更早版本的操作系统上,执行搜索的帐户必须是 Administrators 组的成员才能检索 ntSecurityDescriptor 属性。 如果不是这种情况,则为 ntSecurityDescriptor 返回的属性值将为 null。 有关详细信息,请参阅 NT-Security-Descriptor 文章。

适用于

另请参阅