Share via


What is System.DirectoryServices?

If you have developed an application to access Active Directory®, then you might be familiar with the ADSI and LDAP APIs. System.DirectoryServices offers access to Active Directory through .NET technology, also known as managed code. With System.DirectoryServices, you can use the C# and Visual Basic .NET programming languages to develop applications.

In .NET Framework, classes and properties for directory objects and the methods used to access and manipulate those objects are contained within the System.DirectoryServices namespace. The classes in System.DirectoryServices wrap ADSI functionality, but the naming scheme does not always match its ADSI counterpart. When you use this guide, look for the task to be performed to learn which classes and methods to use. This enables you to quickly become accustomed to the naming scheme used in System.DirectoryServices.

The following diagram shows how the various directory APIs are layered, including the managed code layer.

Managed code diagram