title: Extract Common Name from Distinguished Name
body: <p>Is there a call in .NET that parses the CN from a rfc-2253 encoded distinguished name? I know there are some third-party libraries that do this, but I would prefer to use native .NET libraries if possible.</p>
  
  <p>Examples of a string encoded DN</p>
  
  <blockquote>
    <p>CN=L. Eagle,O=Sue\, Grabbit and Runn,C=GB</p>
    
    <p>CN=Jeff Smith,OU=Sales,DC=Fabrikam,DC=COM</p>
  </blockquote>