This post will discuss how to join two or more lists in C#.

1. Using Enumerable.Concat method

An elegant way to combine multiple lists together is using LINQ’s Concat() method. For example, the following code concatenate elements of the three lists in the original order.

Download  Run Code

2. Using List.AddRange method

An alternative way of concatenating multiple lists is to construct a new list and then apply the List.AddRange() method, passing each list to it. The following example demonstrates this usage.

Download  Run Code

3. Using List.Aggregate method

Finally, we can use the Enumerable.Aggregate method to combine multiple lists into a single list. The Aggregate() method applies an accumulator function on each element of a sequence. It is available in LINQ and can be used as follows:

Download  Run Code

That’s all about joining two or more lists in C#.