The System.DirectoryServices namespace allows you to access Active Directory. There are three main classes that are used to access the directory:
The DirectoryEntry class represents an object in Active Directory. Property contains a collection of attributes for the objects that are stored in a PropertyCollection. PropertyValueCollection is used to store the value of each attribute in the PropertyCollection.
The DirectoryEntries class is a collection of DirectoryEntry objects. The Children property contains a list of child objects of this object in a DirectoryEntries collection.
The DirectorySearcher class can be used to search the directory for objects with specific attributes. It includes SortOption, SearchScope, SortDirection, SearchResults, SearchResultCollection, ResultPropertyCollection, and ResultPropertyValueCollection.