Linq and set theory: Union() and Intersect()

So far, in my series of posts on LINQ we have covered only methods acting on single collections. Today we are going to look at some of the LINQ methods that take a second collection as parameter.

Specifically, we will at the classical set theory operators of union, intersection, and relative complement, which in LINQ are implemented with the Union() and Intersect() methods.

Continue reading →