DirectorySearcher.DirectorySearcher (String, String[][], SearchScope)

The DirectorySearcher constructor initializes a new instance of the DirectorySearcher class with the SearchRoot set to its default value. Filter, PropertiesToLoad, and SearchScope are set to the specified values.

public DirectorySearcher(
  String filter,
  String[] propertiesToLoad,
  SearchScope scope
);
Public Sub New( _
  ByVal filter As String, _
  ByVal propertiesToLoad() As String, _
  ByVal scope As SearchScope _
)

Parameters

  • filter
    The search filter string in Lightweight Directory Access Protocol (LDAP) format. The Filter property is initialized to this value.
  • propertiesToLoad
    The set of properties to retrieve during the search. The PropertiesToLoad property is initialized to this value.
  • scope
    The scope of the search that is observed by the server. The SearchScope property is initialized to this value.

Security

Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries From Partially Trusted Code.

Requirements

Client Requires Windows XP Home Edition, Windows XP Professional, Windows Me, or Windows 98.
Server Requires Windows Server 2003, Windows 2000, or Windows NT 4.0.
Namespace

Defined in System.DirectoryServices.

Assembly

Requires System.DirectoryServices (in System.DirectoryServices.dll).

.NET Framework

Requires .NET Framework 1.0.

See Also

DirectoryEntry, DirectorySearcher, DirectorySearcher.PropertiesToLoad, DirectorySearcher.SearchRoot, DirectorySearcher.SearchScope, DirectorySearcher Constructors, DirectorySearcher Methods, DirectorySearcher Properties, SearchScope Enumeration, System.DirectoryServices Namespace, DirectorySearcher Members (Visual J# Syntax), Managed Extensions for C++ Programming