title: How to convert PropertyValueCollection into a List C# ? (ResultPropertyCollection and SearchResult)
body: <p>I've written a query to read some stuff from Active Directory, but the result is some kind of &quot;ResultPropertyCollection&quot;, which is something I'm not familiar with.</p>
  <p>How can I convert this result to a list (like Generic List) that I'm more familiar with so I can do something with the results?</p>
  <pre><code>DirectoryEntry de = new DirectoryEntry(&quot;LDAP://&quot; + this.rootLDAP);
      DirectorySearcher ds = new DirectorySearcher(de, &quot;(&amp; (objectcategory=Group))&quot;);
      
      ds.PropertiesToLoad.Add(&quot;samaccountname&quot;);
      ds.PropertiesToLoad.Add(&quot;memberof&quot;);
      ds.PropertiesToLoad.Add(&quot;samaccounttype&quot;);
      ds.PropertiesToLoad.Add(&quot;grouptype&quot;);
      ds.PropertiesToLoad.Add(&quot;member&quot;);
      ds.PropertiesToLoad.Add(&quot;objectcategory&quot;);
       
       var r = ( from SearchResult sr in ds.FindAll() select sr ) .ToArray();
  </code></pre>