Basically I am wondering why MS decided to implement an enumerator that only supports going forward: MoveNext()
.
Is it not more flexible to also enforce MovePrevious
for this widely used interface throughout the .NET framework?
I can imagine it making the Linq.Reverse
far easier to implement for MS and more efficient in performance, but I am not sure if this makes other things slower or puts a massive overhead on everything else.
Anyone with more knowledge in this subject can give more info on this please? i.e. the pros and cons of having or not having MovePrevious
in IEnumerable/IEnumerable<T>
.