.NET LINQ vs Java Stream API

Information

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.

Read more...

Check if a String is a Palindrome with LINQ

Programming

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.

Read more...

Aggregating Data with LINQ in .NET9

Programming

.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.

Read more...

Inline Lambdas with LINQ in C# 13

Programming

Reduce verbosity by simplifying lambda expressions with inline syntax

Read more...

The magic of LINQ

Programming

Practical LINQ: Calculate the duration of whole music album

Read more...

How to return Yield Results in Async Operations

Programming

How to return Yield Results in Async Operations thanks to IAsyncEnumerable in C#

Read more...

Performance increase in LINQ 7

Programming

Microsoft used Span and hardware acceleration to work with vectors in order to improve LINQ performance in .NET 7 dramatically.

Read more...

Conditional LINQ clauses

Programming

How to Conditionally apply LINQ Clauses

Read more...

QuickSort Implementation with LINQ

Programming

How to implement QuickSort in C# with LINQ

Read more...

LINQ: Query CSV files

Programming

How to query Comma Separated Value (CSV) files with LINQ

Read more...