BaseGeneratedIteratorStateMachine<TElement>.CreateCopy Method
CreateCopy()
Creates an enumerator from this enumerable as a copy of this instance. See Remarks.
Declaration
public abstract BaseGeneratedIteratorStateMachine<TElement> CreateCopy()
Returns
Type | Description |
---|---|
BaseGeneratedIteratorStateMachine<TElement> | A copy of this instance. |
Remarks
This method is only called if this instance represents an enumerable. It's called only from GetEnumerator() and GetEnumerator() and its return value represents the enumerator.
This way, each enumerator has its own set of arguments and its own method execution tag, so and if you change the arguments or the tag, it will only affect that enumerator an not all of them.