I have a List and I need an IEnumerable, however List.GetEnumerator() returns List.Enumerator …
Is there a simple way of getting (casting to?) an IEnumerator? (currently I have solved this with a loop, however I feel casting the enumerator would be a far better solution)…
A
List<T>is already anIEnumerable<T>.