Concat

suggest change
var numbers1to5 = new[] {1, 2, 3, 4, 5};
var numbers4to8 = new[] {4, 5, 6, 7, 8};

var numbers1to8 = numbers1to5.Concat(numbers4to8);

Console.WriteLine(string.Join(",", numbers1to8));

//1,2,3,4,5,4,5,6,7,8

Note that duplicates are kept in the result. If this is undesirable, use Union instead.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


LINQ:
* LINQ
* Any
* Except
* Zip
* Concat
* Count
* Min
* Cast
* All
* Sum
* Take
* OfType
* Max
* Skip
* Last
* Union
* ToList
* Single
* Join
* Empty
* ThenBy
* Range
* Repeat

Table Of Contents