Matlus
Internet Technology & Software Engineering

Tagged With: Linq

Linq - SelectMany

The linq SelectMany method is probably one of the most powerful method on the Enumerable class but sadly also of of the most difficult to understand. As per the the MSDN documentation for Enumerable.SelectMany, this method is described as:
Projects each element of a sequence to an IEnumerable<T> and flattens the resulting sequences into one sequence
[...]

Linq Group By - Finding Duplicates

This post is a little snippet on using Linq to find duplicates in a list of objects where a specific property of the object is used to find the duplicates. In this particular example, the objects are and in addition to other properties each lesson has a property and what we need to do is find all lessons where the is a duplicate of another lesson. In order to solve this we use and we group by the [...]