Overview of System.DirectoryServices

The System.DirectoryServices namespace contains several classes, many of which were built on top of ADSI. If you are already familiar with ADSI, the learning curve for the System.DirectoryServices classes should be pretty minimal. Table 31-1 contains the base classes contained within the System.DirectoryServices namespace.

Adding a reference to System.DirectoryServices

Figure 31-2. Adding a reference to System.DirectoryServices

Table 31-1. System.DirectoryServices classes

Class name

Description

DirectoryEntries

Contains the children (child entries) of an entry in Active Directory.

DirectoryEntry

Encapsulates a node or object in the Active Directory hierarchy.

DirectorySearcher

Performs queries against Active Directory.

DirectoryServicesPermission

Allows control of code access security permissions for System.DirectoryServices.

DirectoryServicesPermissionAttribute

Allows declarative System.DirectoryServices permission checks.

DirectoryServicesPermissionEntry

Defines the smallest unit of a code access security permission set for System.DirectoryServices.

DirectoryServicesPermissionEntryCollection

Contains a strongly typed collection of DirectoryServicesPermissionEntry objects.

PropertyCollection

Contains the properties of a DirectoryEntry.

PropertyValueCollection

Contains the values of a DirectoryEntry property.

ResultPropertyCollection

Contains ...

Get Active Directory, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.