Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DirectorySearcher.SearchScope Property

Gets or sets the scope of the search that is observed by the server.

[Visual Basic]
Public Property SearchScope As SearchScope
[C#]
public SearchScope SearchScope {get; set;}
[C++]
public: __property SearchScope get_SearchScope();
public: __property void set_SearchScope(SearchScope);
[JScript]
public function get SearchScope() : SearchScope;
public function set SearchScope(SearchScope);

Property Value

One of the SearchScope values. The default is Subtree.

Exceptions

Exception Type Condition
InvalidEnumArgumentException The value is not one of the SearchScope values.

Remarks

The following table shows the SearchScope values.

Value Description
Base Limits the search to the base object. The result contains at most one object.
OneLevel Searches one level of the immediate children, excluding the base object.
Subtree Searches the whole subtree, including all children and the base object itself.

For more information on these values, see SearchScope.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

DirectorySearcher Class | DirectorySearcher Members | System.DirectoryServices Namespace | SearchScope

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft