Javatpoint Logo
Javatpoint Logo

LINQ Concat Method

In LINQ, the Concat method or operator is used to concatenate or append the two collection elements into a single collection, and it does not remove the duplicates from two sequences.

Here is the pictorial representation of the LINQ Concat Method.

LINQ Concat Method

In the above diagram, two lists of elements combined into a single collection.

Syntax of LINQ Concat Method

In the above syntax, we are concatenating two lists into a single list.

Example of LINQ Concat Method

Here is the example of the LINQ Concat method.

In the above example, we are concatenating two sequences "array1","array2" into a single sequence using the concat method.

Output:

LINQ Concat Method




Help Others, Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA