title: Adding a Certificate to x509Store doesn't do anything C#
body: <p>I'm trying to add certificates but the Add function doesn't seem to do anything.</p>
  
  <p>I have two certificates.  Both I can add manually by right clicking and saving to the personal "testStore" store but they don't get saved when I try to add them programmatically. I even added just one of them, and the X509Store object contains it just as expected, but when I call .Add(cert), nothing gets saved there.</p>
  
  <pre><code>//I've already added 1 cert manually
  X509Certificate2 cert2 = new X509Certificate2(@"C:\temp\Cert2.cer");
  X509Store store = new X509Store("testStore", StoreLocation.CurrentUser);
  store.Open(OpenFlags.MaxAllowed);
  
  //here store.Certificates has the one Certificate I added manually as expected.
  
  store.Certificates.Add(cert2);
  
  //here store.Certificates still only has the first certificate, cert2 still isn't there..
  
  store.Close();
  </code></pre>
  
  <p>Am I missing something?</p>
  
  <p>Edit
  I've also tried using StorePermission (as below) and also tried impersonating the administrator account and those didn't help either</p>
  
  <pre><code>StorePermission sp = new StorePermission( PermissionState.Unrestricted);
  sp.Flags = StorePermissionFlags.AllFlags;
  sp.Assert();
  </code></pre>