Accessing Objects in the Directory
If a directory is a type of information store, then it stands to reason that one of the most common activities performed against that data store is data retrieval. In the System.DirectoryServices namespace, you can examine a directory object's properties by using the DirectoryEntry class.
Loading a Specific Directory Entry
Much like an XML tree (see Chapter 10, “Reading and Writing XML”), a directory tree can be “walked” and examined node by node. The DirectoryEntry class represents discrete entries in the directory structure. An entry can be either a container or an actual leaf-level object. For instance, if the directory contains employee records, the directory might be organized along department lines.
Get Visual Basic® Programmer's Guide to the .NET Framework Class Library 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.