In this chapter, we explore how to read and write LDAP data using System.DirectoryServices (SDS). As we discussed in Chapter 1, LDAP data is represented by attributes defined in the LDAP schema. It's interesting how attribute syntaxes in an LDAP directory are converted by the ADSI layer into COM data types, and how those COM data types are again translated into .NET data types. In fact, this is one of the aspects of directory services programming that developers often struggle with. We'll spend a significant portion of the chapter explaining how all of the different syntaxes relate to .NET and we'll provide samples for reading and writing each type. Finally, we'll touch on some interesting problems with attributes that contain many values.