This topic contains links to all of the C# code examples contained in the System.DirectoryServices Using guide.
Using the Add method.
Using the Add method to add child objects.
Using the DirectoryEntry object to bind to objects.
Using the NativeGuid property.
Reading and setting a Boolean property using the Value property.
Changing user passwords.
Reading and writing constructed properties.
Creating a DirectoryEntry object in memory that binds to an entry in the directory, and writing the path, name, and GUID for that directory entry.
Creating a new group, domain local group, and non-secure group.
Writing the date/time property.
Using the Remove method.
Setting up a basic directory search.
Reading and writing using ActiveDS.
Using a simple foreach statement.
Using Properties.
Using a Windows form.
Using range retrieval.
Getting the properties for the DirectoryEntry object.
Using the Invoke method.
Using the InvokeMember method.
Reading and writing large integers.
Using the MoveTo method.
Using the Children property to bind to child objects.
Using the Parent property to bind to parent objects.
Reading and writing octet strings.
Using the Properties collection to read object properties.
Using the Values property and arrays to read property values.
Using the Setting properties with the Add method and Value property.
Using the AddRange and Insert methods and using arrays.
Using the RefreshCache method.
Using the Rename property.
Using DirectorySearcher.
Using the ReferralChasing property.
Using SearchResult and SearchResultCollection classes to retrieve search results.
Using the DirectorySearcher class with the FindAll method to search the directory.
Using the Filter property to set a search filter.
Using the SearchScope property.
Reading and writing security descriptors using ActiveDS.
Setting user passwords.
Reading strings.
Enabling and disabling user accounts.
Using ActiveDS.
Setting flags.
Setting properties that are viewed in the user interface.
Using the Exists method to verify that a directory object exists in the directory.