Last active
October 2, 2015 03:28
-
-
Save cowlike/2162743 to your computer and use it in GitHub Desktop.
ldap read
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foreach (SearchResult dnResult in rootSearcher.FindAll()) | |
{ | |
EmailAddresses.Add(dnResult.Properties["mail"].ToString()); | |
} | |
foreach (SearchResult dnResult in rootSearcher.FindAll()) | |
{ | |
foreach (string dnName in dnResult.Properties.PropertyNames) | |
{ | |
foreach (var dnEntry in dnResult.Properties[dnName]) | |
{ | |
if (dnName == "mail") | |
{ | |
EmailAddresses.Add(dnEntry.ToString()); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment