Linq

LINQ in depth: advanced features and example

In this blog post, I will show you some LINQ advanced features like finding moving average, nth highest salary using LINQ, left, right join using LINQ and many more. How to extract number from string using Linq Moving Aver…

How to extract number from string using Linq

Imagine you have an s tring("ABCDE99F-J74-12-89A") , and you want to extract the only number from the string. This snippet will show how to extract numbers from strings. using System ; using System . Collections . G…

Moving Average In C# Using LINQ

This article will show you how to generate a moving average of C# collection using LINQ to Objects. LINQ is a very popular feature of C# that allows the developer to write the query like SQL. Let’s consider you have the foll…

Using C# Expression Trees with the Real World example

Using C# Expression Trees in the Real World In this article, I will discuss ExpressionTree. Expression tree is a compelling feature of the C#. It allows us to Generate code at runtime Rewrite code at runtime Translate code …

Find Highest in each group using LINQ

I’ll show you how to use LINQ to objects to find the maximum item in each group. Consider this scenario: I have a list of students in this case, along with their grades and marks. Our aim is to determine the student, grade,…

Understanding LINQ's into Clause in C#

LINQ (Language-Integrated Query) is a powerful feature in C# that allows developers to write expressive and concise queries for data manipulation. One interesting aspect of LINQ is the into clause, which is often used in conjun…

Understanding LINQ's let operator in C#

LINQ (Language-Integrated Query) in C# is a powerful tool for querying and manipulating collections. Among its features, the let operator stands out as a versatile tool for creating more readable and maintainable queries. In th…

How to Implement Dense Rank With Linq

In data analysis and reporting, it’s common to assign rankings to a dataset based on certain criteria. One common type of ranking is “dense rank,” which assigns unique ranks to each distinct item in the dataset, with no gaps b…

Load More
That is All