X509CertificateCollection.X509CertificateEnumerator 类

定义

枚举 X509Certificate 中的 X509CertificateCollection 对象。Enumerates the X509Certificate objects in an X509CertificateCollection.

public: ref class X509CertificateCollection::X509CertificateEnumerator : System::Collections::IEnumerator
public class X509CertificateCollection.X509CertificateEnumerator : System.Collections.IEnumerator
type X509CertificateCollection.X509CertificateEnumerator = class
    interface IEnumerator
Public Class X509CertificateCollection.X509CertificateEnumerator
Implements IEnumerator
继承
X509CertificateCollection.X509CertificateEnumerator
实现

注解

枚举器提供对集合中数据的只读访问。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. Reset方法还将枚举器恢复到此位置。The Reset method also brings the enumerator back to this position. 在此位置, 调用Current属性会引发异常。At this position, calling the Current property throws an exception. 因此, 在读取的MoveNext Current值之前, 必须调用方法, 以将枚举器前进到集合的第一个元素。Therefore, you must call the MoveNext method to advance the enumerator to the first element of the collection before reading the value of Current.

此类继承自IEnumerator接口。This class inherits from the IEnumerator interface. 有关枚举集合的详细信息, 请参阅IEnumeratorFor more information about enumerating over a collection, see IEnumerator.

构造函数

X509CertificateCollection.X509CertificateEnumerator(X509CertificateCollection)

为指定的 X509CertificateCollection 初始化 X509CertificateCollection.X509CertificateEnumerator 类的新实例。Initializes a new instance of the X509CertificateCollection.X509CertificateEnumerator class for the specified X509CertificateCollection.

属性

Current

获取 X509Certificate 中的当前 X509CertificateCollectionGets the current X509Certificate in the X509CertificateCollection.

方法

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
MoveNext()

将枚举数推进到集合的下一个元素。Advances the enumerator to the next element of the collection.

Reset()

将枚举数设置为其初始位置,该位置位于集合中第一个元素之前。Sets the enumerator to its initial position, which is before the first element in the collection.

ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

显式界面实现

IEnumerator.Current

有关此成员的说明,请参见 CurrentFor a description of this member, see Current.

IEnumerator.MoveNext()

有关此成员的说明,请参见 MoveNext()For a description of this member, see MoveNext().

IEnumerator.Reset()

有关此成员的说明,请参见 Reset()For a description of this member, see Reset().

适用于