title: How to get DN for a DirectorySearcher's SearchResult in .NET?
body: <p>How can we reliably get the <code>DN</code> of a <code>SearchResult</code>?</p>
  
  <p>We've been using <code>SearchResult.Properties["dn"]</code> but recently encountered an installation where this is not supported.  This customer has other applications that boil down to calling Win32's <code>ldap_get_dn</code> method, but there doesn't seem to be an equivalent for <code>SearchResult</code> in .NET.</p>
  
  <p>The solution needs to work across LDAP servers, not ActiveDirectory-specific.</p>