PrincipalSearcher Constructor (Principal)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Initializes a new instance of the PrincipalSearcher class with the specified query filter.

Namespace:   System.DirectoryServices.AccountManagement
Assembly:  System.DirectoryServices.AccountManagement (in System.DirectoryServices.AccountManagement.dll)

[SecurityCriticalAttribute]
public PrincipalSearcher(
	Principal queryFilter
)

Parameters

queryFilter
Type: System.DirectoryServices.AccountManagement.Principal

The Principal object that specifies the filter to use for the search. The QueryFilter property is initialized to this value.

Exception Condition
ArgumentException

Persisted principal objects can not be used as the QueryFilter.

The queryFilter parameter cannot be null or empty.

.NET Framework
Available since 3.5

System.DirectoryServices.AccountManagement
PrincipalSearcher Overload
PrincipalSearcher Class
Query by Example
System.DirectoryServices.AccountManagement Namespace Overview

Return to top
Show: