// (c) 2006 Richard Grimes // www.grimes.demon.co.uk using System; using System.Security.Cryptography.X509Certificates; class App { static void Main() { X509Store store = new X509Store(StoreName.My); store.Open(OpenFlags.ReadOnly); X509Certificate2Collection certs = X509Certificate2UI.SelectFromCollection ( store.Certificates, "Personal Certificates", "Select one certificate", X509SelectionFlag.SingleSelection); foreach (X509Certificate2 cert in certs) {    Console.WriteLine(cert.Subject); } } }