Concat Prototype : Concat « LINQ « C# / C Sharp






Concat Prototype

 

using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
public class MainClass {
    public static void Main() {
        string[] presidents = {"ant", "arding", "arrison", "eyes", "over", "ackson"};
        IEnumerable<string> items = presidents.Take(5).Concat(presidents.Skip(5));

        foreach (string item in items)
            Console.WriteLine(item);
    }
}

 








Related examples in the same category

1.use Concat with array elements
2.Use Concat to merge two integer arrays into a single sequence
3.Uses Concat to merge the names of all customers and products
4.Concatention by Using the Concat Operator
5.Concat appends one sequence to another