Take operator outputs the first x elements, discarding the rest : Take « LINQ « C# / CSharp Tutorial






using System;
using System.Collections.Generic;
using System.Linq;
public class MainClass {
    public static void Main() {

        int[] numbers = { 10, 9, 8, 7, 6 };
        IEnumerable<int> firstThree = numbers.Take(3);     // { 10, 9, 8 }

    }
}








22.71.Take
22.71.1.Take operator outputs the first x elements, discarding the rest
22.71.2.Use Take
22.71.3.Take method
22.71.4.Take and SelectMany
22.71.5.Partitioning Operators: uses Take to generate a sequence of the first three elements of an integer array.
22.71.6.Nested Take
22.71.7.Get the first four element in the list