Linq to SQL Select Query explanation.
Linq to SQL Select Query explanation.
277
12-Feb-2025
Updated on 13-Feb-2025
Amrith Chandran
13-Feb-2025LINQ Concat() in C#
The
Concat()method in LINQ is used to combine two sequences (collections) into a single sequence without removing duplicates.Basic Syntax
firstCollection, followed by all the elements ofsecondCollection.Example with int type collection-
The above program combines the two integer list into a new integer list.
Example with string type collection
When to use Concat()
Also, read: How to use DefaultIfEmpty() function in LINQ with C#?