StoreLocation Enumeration

StoreLocation Enumeration


Specifies the location of the X.509 certificate store.

Namespace:   System.Security.Cryptography.X509Certificates
Assembly:  System (in System.dll)

public enum StoreLocation

Member nameDescription

The X.509 certificate store used by the current user.


The X.509 certificate store assigned to the local machine.

This enumeration is used with the X509Store constructor.

Legacy Code Example

The following code example opens an X.509 certificate store, adds and deletes certificates, and then closes the store. It assumes you have three certificates to add to and remove from a local store.

[EventSource(Name = "Litware-ProductName-ComponentName")]
public sealed class LitwareComponentNameEventSource : EventSource
    [Event(1, Task = Tasks.Request, Opcode = EventOpcode.Send)]
    public void RequestStart(Guid relatedActivityId, int reqId, string url)
        WriteEventWithRelatedActivityId(1, relatedActivityId, reqId, url);


.NET Framework
Available since 2.0
Return to top
© 2015 Microsoft