3 ms·
Pretty sure IEnumerable was part of the .NET 2.0 release in 2005. https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-version-history#c-version-20
by steve_taylor 4y ago
Pretty sure IEnumerable was part of the .NET 2.0 release in 2005.
https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-version-history#c-version-20 https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csh...
- bzxcvbn 4y agoI don't see how you get to that conclusion. These release notes mention enumerators: > C# version 2.0 brought iterators. To put it succinctly, iterators let you examine all the items in a List (or other Enumerable types) with a foreach loop. Having iterators as a first-class part of the language dramatically enhanced readability of the language and people's ability to reason about the code. The implicit assumption in that sentence is that enumerables existed before iterators.
- SideburnsOfDoom 4y agoIEnumerable<T> was in the 2.0 release - it's generic, there were no generics in 1.0 But the non-generic IEnumerable and foreach syntax was in from 1.0 https://docs.microsoft.com/en-us/dotnet/api/system.collections.ienumerable https://docs.microsoft.com/en-us/dotnet/api/system.collectio... "Yield return" generators is also from 2.0
- steve_taylor 4y agoYeah, OK. I was wrong about IEnumerable, although the original post is also about the features that make IEnumerable great, such as yield return.