I have written a few programs in .Net that utilize Active Directory (AD), and what a pain it was.
Here is an article where the author created classes to encapsulate some of the objects in AD, which is pretty similar to what I did.
Keywords: LDAP, AD, Active Directory