What is the best way to do indexing into
IEnumerable<T>
We have a lot of code that is moving from
IList<T>
and we want to change them to be:
IEnumerable<T>
because we want them to be read-only, but we have a number of pieces of code like:
item.Dates[0]
or
item.Dates[i]
(in a loop).
What is the recommended conversion path here?