This documentation is archived and is not being maintained.

X509Certificate2Collection Class

Represents a collection of X509Certificate2 objects. This class cannot be inherited.

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

public class X509Certificate2Collection extends X509CertificateCollection

When an X509Certificate2 store is opened, the result is represented by an X509Certificate2Collection object. If you are familiar with the unmanaged Cryptographic API constructs, you can think of an X509Certificate2Collection as a memory store of X509Certificate2 objects.

The following code example opens the current user's personal certificate store, selects only valid certificates, allows the user to select a certificate, and then writes certificate and certificate chain information to the console. The output depends on the certificate the user selects.

No code example is currently available or this language may not be supported.

System.Object
  System.Collections.CollectionBase
    System.Security.Cryptography.X509Certificates.X509CertificateCollection
      System.Security.Cryptography.X509Certificates.X509Certificate2Collection

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0

.NET Compact Framework

Supported in: 3.5
Show: