LinkedList<T>.Enumerator.IEnumerator.Reset LinkedList<T>.Enumerator.IEnumerator.Reset LinkedList<T>.Enumerator.IEnumerator.Reset Method

定義

設定列舉值至它的初始位置,這是在集合中第一個項目之前。Sets the enumerator to its initial position, which is before the first element in the collection. 這個類別無法被繼承。This class cannot be inherited.

 virtual void System.Collections.IEnumerator.Reset() = System::Collections::IEnumerator::Reset;
void IEnumerator.Reset ();
Sub Reset () Implements IEnumerator.Reset

實作

例外狀況

建立列舉值之後,集合已修改。The collection was modified after the enumerator was created.

備註

只要集合維持不變,列舉程式就持續有效。An enumerator remains valid as long as the collection remains unchanged. 如果對集合進行了變更, 例如加入、修改或刪除專案, 枚舉器會失效, 且下一次呼叫MoveNextReset 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 MoveNext or Reset throws an InvalidOperationException.

適用於

另請參閱