title: Cannot find certificate in Trusted Publishers store
body: <p>I want to find a certificate in StoreLocation.LocalMachine by thumbprint, however, I found that if I don't specify the <code>StoreName</code>, I don't get anything:</p>
  
  <pre><code>certStore = new X509Store(StoreLocation.LocalMachine);
  certStore.Open(OpenFlags.ReadOnly);
  X509Certificate2Collection certCollection = certStore.Certificates.Find(
       X509FindType.FindByThumbprint, thumbprint, false);
  // always find nothing, no matter runs as Administrator or not.
  </code></pre>
  
  <p>but if I specify the <code>StoreName</code> when initializing X509Store, I can find the certificate.</p>
  
  <pre><code>certStore = new X509Store(StoreName.TrustedPublisher, StoreLocation.LocalMachine);
  certStore.Open(OpenFlags.ReadOnly);
  X509Certificate2Collection certCollection = certStore.Certificates.Find(
     X509FindType.FindByThumbprint, thumbprint, false);
  </code></pre>
  
  <p>MSDN doesn't say the difference between <code>X509Store</code> constructors, if <code>StoreName</code> is not specified, does it mean it searches in all store names? It doesn't look like it's the case to me.</p>