NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

IEnumerator.Reset

When implemented by a class, sets the enumerator back to its initial position, which is before the first element in the collection.

[Visual Basic]
Sub Reset()
[C#]
void Reset();
[C++]
void Reset() = 0;
[JScript]
function Reset();

Return Value

None.

Exceptions

Exception Type Condition
InvalidOperationException The collection was modified after the enumerator was instantiated.

Remarks

Notes to Implementers: 

All calls to Reset must result in logically the same state for the enumerator. This may involve taking a new snapshot of the collection or simply moving to the beginning of the collection.

The preferred implementation is to simply move the enumerator to the beginning of the collection, before the first element. This would invalidate the enumerator if the collection has been modified since the enumerator was instantiated, but this behavior would be consistent with MoveNext and Current.

See Also

IEnumerator Interface | IEnumerator Members | System.Collections Namespace | MoveNext | Current