X509Certificate2Enumerator.Reset 方法
定义
将枚举数设置为其初始位置,该位置位于 X509Certificate2Collection 对象中第一个元素之前。Sets the enumerator to its initial position, which is before the first element in the X509Certificate2Collection object.
public:
void Reset();
public void Reset ();
member 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. 如果对集合所做的更改(如添加、修改或删除元素),则枚举器将无法恢复,并且对或方法的下一个调用将 MoveNext Reset 引发 InvalidOperationException 。If changes are made to the collection, such as adding, modifying or deleting elements, the enumerator is irrecoverably invalidated and the next call to the MoveNext or Reset method throws an InvalidOperationException.