5 ms·
For someone who is not well versed in MS world, what is the C# equivalent of the Java Streams API?
by a_imho 8y ago
For someone who is not well versed in MS world, what is the C# equivalent of the Java Streams API?
- barrkel 8y agoLINQ, the IEnumerable extension methods, and IQueryable extension methods.
- marxama 8y agoI'd like to point out that the extension method feature of C# is one big reason why I like this whole story much better than the Streams API in Java. There are often methods I wish were part of the IEnumerable interface, and with extension methods, I can add them myself! (if they are not already provided in, say, MoreLinq [1]). Very convenient, and a big boost in productivity. https://github.com/morelinq/MoreLINQ https://github.com/morelinq/MoreLINQ
- BjorksEgo 8y agohaving a look at it, it seems like LINQ?
- arethuza 8y agoI had no idea what Java Streams was (a long time since I wrote much Java) and it appears to be the Java version of LINQ: https://www.foreach.be/blog/java-and-net-comparing-streams-linq https://www.foreach.be/blog/java-and-net-comparing-streams-l...
- wisam 8y agoI would say IEnumerable<T> interface.
- gameswithgo 8y agolinq, kind of, but it has more run time overhead and is more flexible.
- tigershark 8y agoJava streams is the awful copy of LINQ, written something like 7 years later.