Queryable.Take : Queryable « System.Linq « C# / C Sharp by API






Queryable.Take

  
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.Queryable.All
2.Queryable.Concat
3.Queryable.Contains
4.Queryable.Count()
5.Queryable.Distinct()
6.Queryable.Except
7.Queryable.First
8.Queryable.First(filter)
9.Queryable.FirstOrDefault
10.Queryable.Intersect
11.Queryable.Last()
12.Queryable.LastOrDefault(filter)
13.Queryable.LongCount()
14.Queryable.LongCount(filter)
15.Queryable.Max
16.Queryable.Max(filter)
17.Queryable.Min()
18.Queryable.Min(filter)
19.Queryable.OfType
20.Queryable.OrderBy
21.Queryable.OrderByDescending
22.Queryable.Reverse
23.Queryable.SelectMany
24.Queryable.SequenceEqual
25.Queryable.Single
26.Queryable.SingleOrDefault
27.Queryable.Skip
28.Queryable.SkipWhile
29.Queryable.SkipWhile(filter)
30.Queryable.StartsWith
31.Queryable.Sum()
32.Queryable.Sum(projection)
33.Queryable.TakeWhile
34.Queryable.TakeWhile(filter)
35.Queryable.ThenBy
36.Queryable.ThenByDescending
37.Queryable.ToArray
38.Queryable.ToDictionary
39.Queryable.ToDictionary(filter)
40.Queryable.ToList()
41.Queryable.Union