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


public sealed class X509Certificate2Enumerator : IEnumerator


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.


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