1 min readSep 13, 2019
Hi,
ToList() is great to cache data, as long as you’re sure that it won’t take too much memory and O(n) searchs are acceptable.
I just find that too many people assume that it works like a cast, like AsEnumerable(). I’ve found people using ToList() just so that they can use ForEach(). I want them to be aware of the cost.
Nothing against ToList(). 😉