System.Security.Cryptography.X509Certificates.X509Certificate2Enumerator Class

Supports a simple iteration over a System.Security.Cryptography.X509Certificates.X509Certificate2Collection object. This class cannot be inherited.

See Also: X509Certificate2Enumerator Members

Syntax

public sealed class X509Certificate2Enumerator : IEnumerator

Remarks

Enumerators provide read-only access to the data in the collection. Enumerators cannot be used to modify the underlying collection.

Initially, the enumerator is positioned before the first element in the collection. The X509Certificate2Enumerator.Reset method also brings the enumerator back to this position. At this position, calling the X509Certificate2Enumerator.Current property throws an exception. Therefore, you must call the X509Certificate2Enumerator.MoveNext method to advance the enumerator to the first element of the collection before reading the value of X509Certificate2Enumerator.Current.

This class inherits from the IEnumerator interface. For more information about enumerating over a collection, see IEnumerator.

Requirements

Namespace: System.Security.Cryptography.X509Certificates
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0