I use the LDAP connection class, working from this page on MSDN .
I instantiated the class using the string constructor as follows:
LdapConnection ld = new LdapConnection("LDAP://8.8.8.8:8888");
Now I want to set my credentials, so I'm trying to do the following:
ld.Credential.UserName = "Foo";
But I get the following error:
The property or indexer 'System.DirectoryServices.Protocols.DirectoryConnection.Credential' cannot be used in this context because it lacks a get accessor.
However, when typing, intellisense shows the following:

This description assumes that UserName really needs to have an Access Accessor, what am I missing?
thank
source
share