List Objects : Read : Directory Services C# Examples


C# Examples » Directory Services » Read »

 

List Objects









    
using  System;
using  System.Collections;
using  System.DirectoryServices;

class  MainClass
{
      public  static  void  Main()
      {
            DirectoryEntry  de  =  new  DirectoryEntry(
                "LDAP://192.168.1.100/dc=ispnet1,  dc=net");

            Console.WriteLine(de.Path);
            DirectoryEntries  des  =  de.Children;
            foreach(DirectoryEntry  entry  in  des)
            {
                  Console.WriteLine("    child:  "  +  entry.Name);
            }
      }
}
    
   
  
   



Output

LDAP://192.168.1.100/dc=ispnet1, dc=net
^CTerminate batch job (Y/N)? n


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Directory Services
» Read