Reputation: 3317
I am reading active director user information than i want to save to csv file.
DirectoryEntry de=new DirectoryEntry("LDAP://xxxx.com, xxxx, xxxx, AutentniciationTypes.Secure");
DirectorySearcher ds=new DirectorySearcher(de);
ds.Filter="(&(objectClass=user)(I="+ "xxxx"));
SearchhResultCollection results=ds.FindAll();
Next i would like to save the "results" to csv file. Please let me known to do it. Thanks
Upvotes: 0
Views: 1546
Reputation: 2501
It seems that you are looking for the same as in this question https://stackoverflow.com/questions/18594416/searchresultcollection-to-csv
Iterate through the SearchResultCollection and write to a text-file as mentioned in above link.
Upvotes: 1