Does any one know how to or have example code for querying Active Directory for a users details?

Thanks in advance.