title: Get all certificates installed on Local machine
body: <p>I have the following code to get the certificates:</p>
  
  <pre><code>X509Store store = new X509Store("??","??");
              List&lt;X509Certificate2&gt; lst = new List&lt;X509Certificate2&gt;();
              store.Open(OpenFlags.ReadOnly);
  
              foreach (X509Certificate2 mCert in store.Certificates)
              {
  
                  lst.Add(mCert);
                  //TODO's
              }
  </code></pre>
  
  <blockquote>
    <p>Now I want to get all the certificates installed on <em>Local Machine</em> in
    a list&lt;> with Certificate Name, Their location, Issued with Public key
    Or Private Key(in Yes or No only) and the name of folder which
    contains those certs(please refer below snapshot):</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/tRCdt.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tRCdt.jpg" alt="enter image description here"></a></p>
  
  <p>After populating List&lt;> with Certs details I want to display those data in a grid format. How to modify this code to get above details?</p>