.NET LINQ vs Java Stream API
In Java, the closest equivalent to .NET's LINQ (Language Integrated Query) is the Stream API introduced in Java 8. Both LINQ in .NET and the Stream API in Java provide a functional approach to handling collections, enabling operations like filtering, mapping, reducing, and sorting in a concise and readable manner. However, there are significant differences in how these two approaches leverage hardware acceleration, which can impact performance.
Check if a String is a Palindrome with LINQ
You can use the power of LINQ to solve problems in just a few lines of code instead of "inventing your own algorithms" - which will lead to much cleaner code. Let's examine for example on how to check for palindromes.
Aggregating Data with LINQ in .NET9
.NET9 has introduced two new LINQ methods, CountBy
and AggregateBy
, making data aggregation easier and more efficient without the need for complex intermediate steps like GroupBy
.
Inline Lambdas with LINQ in C# 13
Reduce verbosity by simplifying lambda expressions with inline syntax
The magic of LINQ
Practical LINQ: Calculate the duration of whole music album
How to return Yield Results in Async Operations
How to return Yield Results in Async Operations thanks to IAsyncEnumerable in C#
Performance increase in LINQ 7
Microsoft used Span and hardware acceleration to work with vectors in order to improve LINQ performance in .NET 7 dramatically.
QuickSort Implementation with LINQ
How to implement QuickSort in C# with LINQ
LINQ: Query CSV files
How to query Comma Separated Value (CSV) files with LINQ