Why enumerator structs are a really bad idea (redux)
- by Simon Cooper
My previous blog post went into some detail as to why calling MoveNext on a BCL generic collection enumerator didn't quite do what you thought it would. This post covers the Reset method.
To recap, here's the simple wrapper around a linked list enumerator struct from my previous post (minus the readonly on the enumerator variable):
sealed class…