The concatenation is a process in which one sequence is appended into another sequence. In LINQ, the concatenation operation contains only one operator that is known as Concat. It is used to append two same types of sequences or collections and return a new sequence or collection.
- It does not support query syntax in C# and VB.NET languages.
- It support method syntax in both C# and VB.NET languages.
- It present in both the Queryable and Enumerable class.
- It is implemented by using deferred execution.
- It allow duplicate elements.
As shown in the below image, here two sequences of the same types are concatenated into one sequence.
Sequence 1 is: p q r s y z Sequence 2 is: p m o e c z New Sequence: p q r s y z p m o e c z
Major Languages Used are: C# C Java Scala Python Ruby
- LINQ | Set Operator | Except
- LINQ | Partition Operator | Take
- LINQ | Filtering Operator | where
- LINQ | Element Operator | Last
- LINQ | Element Operator | First
- LINQ | Set Operator | Distinct
- LINQ | Quantifier Operator | Contains
- LINQ | Quantifier Operator | Any
- LINQ | Set Operator | Union
- LINQ | Set Operator | Intersect
- LINQ | Quantifier Operator | All
- LINQ | Partition Operator | Skip
- LINQ | Equality Operator | SequenceEqual
- LINQ | Sorting Operator | OrderBy
- LINQ | Generation Operator | DefaultIfEmpty
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.