In my c# app, I’ve got a list that I navigate with an Enumerator. It works great for moving forward through the list, but the Enumerator class doesn’t have a MoveBack method.
Is there different class that has a MoveBack method, or do I need to write my own?
Any enumerators using the IEnumerator interface by definition must start before the first element and iterate forwards through the collection. In short: they don’t support backwards traversal.
If you want backwards traversal you’ll need to write your own enumeration functions that allow you start anywhere you want.