try { string path = "LDAP://usihgdgfui"; string filter = "(&(objectCategory=person))"; string[] propertiesToLoad = new string[1] { "name" }; using (DirectoryEntry root = new DirectoryEntry(path, "xx\\xxxx", "xxxx")) using (DirectorySearcher searcher = new DirectorySearcher(root, filter, propertiesToLoad)) using (SearchResultCollection results = searcher.FindAll()) { foreach (SearchResult result in results) { string name = (string)result.Properties["name"][0]; comboBox1.Items.Add(name); } } } catch { }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)