X509Certificate2Enumerator 类

定义

支持在 X509Certificate2Collection 对象上进行简单迭代。Supports a simple iteration over a X509Certificate2Collection object. 此类不能被继承。This class cannot be inherited.

public ref class X509Certificate2Enumerator sealed : System::Collections::IEnumerator
public sealed class X509Certificate2Enumerator : System.Collections.IEnumerator
type X509Certificate2Enumerator = class
    interface IEnumerator
Public NotInheritable Class X509Certificate2Enumerator
Implements IEnumerator
继承
X509Certificate2Enumerator
实现

注解

枚举器提供对集合中数据的只读访问。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.

属性

Current

获取 X509Certificate2Collection 对象中的当前元素。Gets the current element in the X509Certificate2Collection object.

方法

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()

将枚举数前移到 X509Certificate2Collection 对象中的下一个元素。Advances the enumerator to the next element in the X509Certificate2Collection object.

Reset()

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

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().

适用于