3 ms·
I also believe that an IDE like Rider will complain that the IEnumerable returned by `.Select` is consumed multiple times.
by mxz3000 3y ago
I also believe that an IDE like Rider will complain that the IEnumerable returned by `.Select` is consumed multiple times.
- progmetaldev 3y agoYes, and both Rider and VS with Resharper will offer a refactor.
- diarrhea 3y agoGood point! I remember that being a lint in Visual Studio. A very valid one. In contrast, in Python, initial use exhausts generators. Subsequent iterations turns up empty. A gotcha, but also a way to highlight misuse, as it should show up in testing.