.NET Active Directory Wrapper    
Access Active Directory From Your C# or VB .Net Code
 

How to list Users under a given Organizational Unit (OU)

   1:              LdapManager myLDAP = new LdapManager("192.168.1.40");
   2:   
   3:              if (!myLDAP.Login("administrator", "Passw0rd2"))
   4:              {
   5:                  label1.Text = "Invalid Login";
   6:                  return;
   7:   
   8:              }
   9:   
  10:              LdapOUCollection myOUs = myLDAP.GetOUs();
  11:   
  12:              LdapUserCollection myUsers = myOUs[1].GetUsers();
  13:   
  14:              foreach (LdapUser user in myUsers)
  15:              {
  16:                  label1.Text += user.Firstname + "\n";
  17:              }