Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

DirectorySearcher.PropertiesToLoad Property

Gets a value indicating the list of properties to retrieve during the search.

Namespace:  System.DirectoryServices
Assembly:  System.DirectoryServices (in System.DirectoryServices.dll)
[DSDescriptionAttribute("DSPropertiesToLoad")]
public StringCollection PropertiesToLoad { get; }

Property Value

Type: System.Collections.Specialized.StringCollection
A StringCollection object that contains the set of properties to retrieve during the search.
The default is an empty StringCollection, which retrieves all properties.

To retrieve specific properties, add them to this collection before you begin the search. For example, searcher.PropertiesToLoad.Add("phone"); will add the phone property to the list of properties to retrieve in the search.

The property "ADsPath" is always retrieved during the search. On Windows 2000 and earlier operating systems, the account that performs the search must be a member of the Administrators group to retrieve the ntSecurityDescriptor property. If this is not the case, the property value that is returned for ntSecurityDescriptor will be null. For more information, see the topic "NT-Security-Descriptor" in the MSDN Library at http://msdn.microsoft.com/library.

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft. All rights reserved.