System#Collections#IEnumerator#Reset Method
Sets the enumerator to its initial position, which is before the first element in the ModelMeshPartCollection.
Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework.Graphics (in microsoft.xna.framework.graphics.dll)
Syntax
private void System#Collections#IEnumerator#Reset ()
Exceptions
Exception type | Condition |
---|---|
InvalidOperationException | The collection was modified after the enumerator was created. |
Remarks
An enumerator remains valid as long as the collection remains unchanged. If changes, such as adding, modifying, or deleting elements are made to the collection, the enumerator is irrecoverably invalidated and the next call to MoveNext or the System#Collections#IEnumerator#Reset throws an InvalidOperationException.
Note
Notes to Implementers: All calls to System#Collections#IEnumerator#Reset must result in the same state for the enumerator. The preferred implementation is to move the enumerator to the beginning of the collection, before the first element. This invalidates the enumerator if the collection has been modified since the enumerator was created, which is consistent with MoveNext and Current.
See Also
Reference
ModelMeshPartCollection.Enumerator Structure
ModelMeshPartCollection.Enumerator Members
Microsoft.Xna.Framework.Graphics Namespace
Platforms
Xbox 360, Windows 7, Windows Vista, Windows XP