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)

public StringCollection PropertiesToLoad { get; }
/** @property */
public StringCollection get_PropertiesToLoad ()

public function get PropertiesToLoad () : StringCollection

Not applicable.

Property Value

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 a null reference (Nothing in Visual Basic). For more information, see the topic "NT-Security-Descriptor" in the MSDN Library at

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions