X509CertificateCollection.X509CertificateEnumerator.Reset 方法
定义
将枚举数设置为其初始位置,该位置位于集合中第一个元素之前。Sets the enumerator to its initial position, which is before the first element in the collection.
public:
void Reset();
public void Reset ();
member this.Reset : unit -> unit
Public Sub Reset ()
例外
实例化枚举数之后修改了集合。The collection is modified after the enumerator is instantiated.
注解
只要集合保持不变,枚举器就仍有效。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.