D
Drew Burchett
I am working with Active Directory in C# and trying to read and set certain
attributes. To set an attribute, I have the following code:
DirectoryEntry de = new DirectoryEntry(); //This is assigned to a
DirectoryEntry from a search result.
de.Properties["telephoneNumber"].Value = telephoneNumber;
de.CommitChanges();
The code above works perfectly unless telephoneNumber is an empty string.
How can I either assign an empty string to the value, or remove any value
that is there?
attributes. To set an attribute, I have the following code:
DirectoryEntry de = new DirectoryEntry(); //This is assigned to a
DirectoryEntry from a search result.
de.Properties["telephoneNumber"].Value = telephoneNumber;
de.CommitChanges();
The code above works perfectly unless telephoneNumber is an empty string.
How can I either assign an empty string to the value, or remove any value
that is there?