domain-services

Determine current domain controller programmatically

I need to query current domain controller, probably primary to change user password. (P)DC name should be fully qualified, i.e. DC=pdc,DC=example,DC=com (how to properly name such notation?) How can it be done using C#? ...