The task is to establish a connection to an Active Directory or Lightweight Directory Access Protocol server.

 
// Requires adding a reference to System.DirectoryServices 
var objDE = new System.DirectoryServices.DirectoryEntry("LDAP://DC=onecity,DC=corp,DC=fabrikam,DC=com");
 