X509ChainElementEnumerator.Reset 方法

定义

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

public:
 virtual void Reset();
public void Reset ();
abstract member Reset : unit -> unit
override this.Reset : unit -> unit
Public Sub Reset ()

实现

例外

集合在枚举器创建后被修改。The collection was modified after the enumerator was created.

注解

只要集合保持不变,枚举器就仍有效。An enumerator remains valid as long as the collection remains unchanged. 如果集合发生更改(如添加、修改或删除元素),则枚举器无效且无法恢复,对 MoveNextReset 的下一个调用将引发 InvalidOperationExceptionIf changes are made to the collection, such as adding, modifying or deleting elements, the enumerator is irrecoverably invalidated and the next call to MoveNext or Reset throws an InvalidOperationException.

适用于