title: c# reflection parameter count mismatch
body: <p>I have been trying to create an instance of the <a href="http://msdn.microsoft.com/en-us/library/system.directoryservices.searchresult%28v=vs.110%29.aspx" rel="nofollow">SearchResult</a> class of System.DirectoryServices. </p>
  
  <p>According to MSDN, its implementation is this:</p>
  
  <pre><code>[DirectoryServicesPermissionAttribute(SecurityAction.LinkDemand, Unrestricted = true)]
  public class SearchResult
  </code></pre>
  
  <p>My reflection is like this:</p>
  
  <pre><code>ConstructorInfo ctor = typeof(SearchResult).GetConstructors(BindingFlags.Instance | BindingFlags.NonPublic)[0];
  SearchResult abc = (SearchResult)ctor.Invoke(new object[] { });
  </code></pre>
  
  <p>There is a value in <code>ctor</code> but upon invoking the constructor, an error occurs:</p>
  
  <pre><code>An unhandled exception of type 'System.Reflection.TargetParameterCountException' occurred in mscorlib.dll
  Additional information: Parameter count mismatch.
  </code></pre>
  
  <p>Why it does say that there's a parameter count mismatch when the implementation says it has no params in its constructor? I changed <code>new object[] { }</code> to <code>null</code> but it says the same error.</p>
  
  <p>How can I fix this? Thanks.</p>